Skip to content

Commit

Permalink
test: add more test cases for the new storage (#574)
Browse files Browse the repository at this point in the history
* test: add more test cases for the new storage

Signed-off-by: zongz <[email protected]>

* fix: fix missing message in test case

Signed-off-by: zongz <[email protected]>

---------

Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe authored Dec 20, 2024
1 parent 1a5729a commit 532c46c
Show file tree
Hide file tree
Showing 25 changed files with 592 additions and 0 deletions.
464 changes: 464 additions & 0 deletions pkg/client/client_test.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
helloworld = { oci = "oci://ghcr.io/kcl-lang/helloworld", tag = "0.1.2", version = "0.1.2" }
9 changes: 9 additions & 0 deletions pkg/client/test_data/test_new_storage/mod/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dependencies]
[dependencies.helloworld]
name = "helloworld"
full_name = "helloworld_0.1.2"
version = "0.1.2"
sum = "PN0OMEV9M8VGFn1CtA/T3bcgZmMJmOo+RkBrLKIWYeQ="
reg = "ghcr.io"
repo = "kcl-lang/helloworld"
oci_tag = "0.1.2"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_0/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
helloworld = { oci = "oci://ghcr.io/kcl-lang/helloworld", tag = "0.1.2", version = "0.1.2" }
9 changes: 9 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_0/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dependencies]
[dependencies.helloworld]
name = "helloworld"
full_name = "helloworld_0.1.2"
version = "0.1.2"
sum = "PN0OMEV9M8VGFn1CtA/T3bcgZmMJmOo+RkBrLKIWYeQ="
reg = "ghcr.io"
repo = "kcl-lang/helloworld"
oci_tag = "0.1.2"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_0/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_1/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
flask_manifests = { git = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git", branch = "main", version = "0.0.1" }
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_1/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[dependencies]
[dependencies.flask_manifests]
name = "flask_manifests"
full_name = "flask_manifests_0.0.1"
version = "0.0.1"
url = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git"
branch = "main"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_1/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_2/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
flask_manifests = { git = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git", branch = "main", version = "0.0.1" }
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_2/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[dependencies]
[dependencies.flask_manifests]
name = "flask_manifests"
full_name = "flask_manifests_0.0.1"
version = "0.0.1"
url = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git"
branch = "main"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_2/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_3/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
helloworld = { oci = "oci://ghcr.io/kcl-lang/helloworld", tag = "0.1.2", version = "0.1.2" }
9 changes: 9 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_3/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dependencies]
[dependencies.helloworld]
name = "helloworld"
full_name = "helloworld_0.1.2"
version = "0.1.2"
sum = "PN0OMEV9M8VGFn1CtA/T3bcgZmMJmOo+RkBrLKIWYeQ="
reg = "ghcr.io"
repo = "kcl-lang/helloworld"
oci_tag = "0.1.2"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_3/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_4/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
helloworld = { oci = "oci://ghcr.io/kcl-lang/helloworld", tag = "0.1.2", version = "0.1.2" }
9 changes: 9 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_4/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dependencies]
[dependencies.helloworld]
name = "helloworld"
full_name = "helloworld_0.1.2"
version = "0.1.2"
sum = "PN0OMEV9M8VGFn1CtA/T3bcgZmMJmOo+RkBrLKIWYeQ="
reg = "ghcr.io"
repo = "kcl-lang/helloworld"
oci_tag = "0.1.2"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_4/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_5/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
flask_manifests = { git = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git", branch = "main", version = "0.0.1" }
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_5/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[dependencies]
[dependencies.flask_manifests]
name = "flask_manifests"
full_name = "flask_manifests_0.0.1"
version = "0.0.1"
url = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git"
branch = "main"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_5/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_6/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mod"
edition = "v0.11.0-alpha.1"
version = "0.0.1"

[dependencies]
flask_manifests = { git = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git", branch = "main", version = "0.0.1" }
7 changes: 7 additions & 0 deletions pkg/client/test_data/test_new_storage/mod_6/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[dependencies]
[dependencies.flask_manifests]
name = "flask_manifests"
full_name = "flask_manifests_0.0.1"
version = "0.0.1"
url = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git"
branch = "main"
1 change: 1 addition & 0 deletions pkg/client/test_data/test_new_storage/mod_6/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The_first_kcl_program = 'Hello World!'

0 comments on commit 532c46c

Please sign in to comment.