From 359548ab2e5c6526ba0ef4e1b489d10685aa117f Mon Sep 17 00:00:00 2001 From: zongz Date: Mon, 4 Nov 2024 10:52:01 +0800 Subject: [PATCH] fix: fix test case, replace deprecated konfig with v0.10.0 Signed-off-by: zongz --- scripts/pull_pkg.sh | 4 ++++ scripts/push_pkg.sh | 8 +++++++- .../kpm_pull_with_oci_url/test_suite.stdout | 4 ++-- .../kpm_pull_with_pkg_name/test_suite.stdout | 4 ++-- .../2.first_add_konfig_dep/test_suite.input | 2 +- .../2.first_add_konfig_dep/test_suite.stdout | 2 +- .../3.second_add_konfig_dep/test_suite.input | 2 +- .../3.second_add_konfig_dep/test_suite.stdout | 2 +- .../4.third_add_konfig_dep/test_suite.input | 2 +- .../4.third_add_konfig_dep/test_suite.stdout | 2 +- 10 files changed, 21 insertions(+), 11 deletions(-) diff --git a/scripts/pull_pkg.sh b/scripts/pull_pkg.sh index aed1488d..c43d3afe 100755 --- a/scripts/pull_pkg.sh +++ b/scripts/pull_pkg.sh @@ -27,6 +27,10 @@ if [ ! -d "./ghcr.io/kcl-lang/k8s/1.27" ]; then $current_dir/bin/kpm pull k8s:1.27 fi +if [ ! -d "./ghcr.io/kcl-lang/k8s/1.31.2" ]; then + $current_dir/bin/kpm pull k8s:1.31.2 +fi + if [ ! -d "./ghcr.io/kcl-lang/helloworld/0.1.1" ]; then $current_dir/bin/kpm pull helloworld:0.1.1 fi diff --git a/scripts/push_pkg.sh b/scripts/push_pkg.sh index 25aa660b..bcaad983 100755 --- a/scripts/push_pkg.sh +++ b/scripts/push_pkg.sh @@ -24,12 +24,18 @@ $current_dir/bin/kpm push cd "$current_dir" -# Push the package k8s/1.17 to the registry +# Push the package k8s/1.27 to the registry cd ./scripts/pkg_in_reg/ghcr.io/kcl-lang/k8s/1.27 $current_dir/bin/kpm push cd "$current_dir" +# Push the package k8s/1.31.2 to the registry +cd ./scripts/pkg_in_reg/ghcr.io/kcl-lang/k8s/1.31.2 +$current_dir/bin/kpm push + +cd "$current_dir" + # Push the package helloworld/1.17 to the registry cd ./scripts/pkg_in_reg/ghcr.io/kcl-lang/helloworld/0.1.1 $current_dir/bin/kpm push diff --git a/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_oci_url/test_suite.stdout b/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_oci_url/test_suite.stdout index 33f05b58..88624647 100644 --- a/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_oci_url/test_suite.stdout +++ b/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_oci_url/test_suite.stdout @@ -1,4 +1,4 @@ start to pull 'oci://localhost:5001/test/k8s' -the lastest version '1.27' will be pulled -pulling '/test/k8s:1.27' from 'localhost:5001/test/k8s' +the lastest version '1.31.2' will be pulled +pulling '/test/k8s:1.31.2' from 'localhost:5001/test/k8s' pulled 'oci://localhost:5001/test/k8s' in '/localhost:5001/test/k8s' successfully \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_pkg_name/test_suite.stdout b/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_pkg_name/test_suite.stdout index 40ffd240..0a80e702 100644 --- a/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_pkg_name/test_suite.stdout +++ b/test/e2e/test_suites/kpm/exec_outside_pkg/kpm_pull_with_pkg_name/test_suite.stdout @@ -1,4 +1,4 @@ start to pull 'k8s' -the lastest version '1.27' will be pulled -pulling 'test/k8s:1.27' from 'localhost:5001/test/k8s' +the lastest version '1.31.2' will be pulled +pulling 'test/k8s:1.31.2' from 'localhost:5001/test/k8s' pulled 'k8s' in '/localhost:5001/test/k8s' successfully \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.input b/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.input index 9991dfe3..10bf81bf 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.input +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.input @@ -1 +1 @@ -kpm add -git https://github.com/awesome-kusion/konfig.git -tag v0.0.1 \ No newline at end of file +kpm add -git https://github.com/kcl-lang/konfig -tag v0.10.0 \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.stdout b/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.stdout index f41d3344..770f542c 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.stdout +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/2.first_add_konfig_dep/test_suite.stdout @@ -1 +1 @@ -add dependency 'konfig:v0.0.1' successfully \ No newline at end of file +add dependency 'konfig:v0.10.0' successfully \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.input b/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.input index 9991dfe3..10bf81bf 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.input +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.input @@ -1 +1 @@ -kpm add -git https://github.com/awesome-kusion/konfig.git -tag v0.0.1 \ No newline at end of file +kpm add -git https://github.com/kcl-lang/konfig -tag v0.10.0 \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.stdout b/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.stdout index f41d3344..770f542c 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.stdout +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/3.second_add_konfig_dep/test_suite.stdout @@ -1 +1 @@ -add dependency 'konfig:v0.0.1' successfully \ No newline at end of file +add dependency 'konfig:v0.10.0' successfully \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.input b/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.input index 9991dfe3..10bf81bf 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.input +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.input @@ -1 +1 @@ -kpm add -git https://github.com/awesome-kusion/konfig.git -tag v0.0.1 \ No newline at end of file +kpm add -git https://github.com/kcl-lang/konfig -tag v0.10.0 \ No newline at end of file diff --git a/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.stdout b/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.stdout index f41d3344..770f542c 100644 --- a/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.stdout +++ b/test/e2e/test_suites/kpm/workflows/add_multi_times/4.third_add_konfig_dep/test_suite.stdout @@ -1 +1 @@ -add dependency 'konfig:v0.0.1' successfully \ No newline at end of file +add dependency 'konfig:v0.10.0' successfully \ No newline at end of file