Skip to content

Commit

Permalink
fix: fix test case
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <zongzhe1024@163.com>
  • Loading branch information
zong-zhe committed Mar 14, 2024
1 parent 20248c5 commit a4ee5ad
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 77 deletions.
2 changes: 1 addition & 1 deletion pkg/api/test_data/test_run_pkg_in_path/expected.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"demo": {"apiVersion": "apps/v1", "kind": "Deployment", "metadata": {"name": "nginx-deployment"}, "spec": {"replicas": 3, "selector": {"matchLabels": {"app": "nginx"}}, "template": {"metadata": {"labels": {"app": "nginx"}}, "spec": {"containers": [{"image": "nginx:1.14.2", "name": "nginx", "ports": [{"containerPort": 80}]}]}}}}}]
{"demo":{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"name":"nginx-deployment"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"nginx:1.14.2","name":"nginx","ports":[{"containerPort":80}]}]}}}}}
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
workload:
containers:
nginx:
image: nginx:v1
command:
- /bin/sh
- -c
- echo hi
args:
- /bin/sh
- -c
- echo hi
env:
env1: VALUE
env2: secret://sec-name/key
workingDir: /tmp
readinessProbe:
probeHandler:
url: http://localhost:80
initialDelaySeconds: 10
replicas: 2
monitoring:
interval: 30s
timeout: 15s
path: /metrics
port: web
scheme: http
helloworld:
workload:
containers:
nginx:
image: nginx:v1
command:
- /bin/sh
- -c
- echo hi
args:
- /bin/sh
- -c
- echo hi
env:
env1: VALUE
env2: secret://sec-name/key
workingDir: /tmp
readinessProbe:
probeHandler:
url: http://localhost:80
initialDelaySeconds: 10
replicas: 2
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
catalog = { git = "https://github.com/KusionStack/catalog.git", commit = "a29e3db" }
catalog = { git = "https://github.com/KusionStack/catalog.git", commit = "3891e96" }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import catalog.models.schema.v1.workload.container as c
import catalog.models.schema.v1.workload.container.probe as p
import catalog.models.schema.v1.monitoring as m

ac.AppConfiguration {
# base.k declares reusable configurations for all stacks.
helloworld: ac.AppConfiguration {
workload: wl.Service {
containers: {
"nginx": c.Container {
Expand Down Expand Up @@ -34,12 +35,4 @@ ac.AppConfiguration {
# Set the replicas
replicas: 2
}
# Add the monitoring configuration backed by Prometheus
monitoring: m.Prometheus{
interval: "30s"
timeout: "15s"
path: "/metrics"
port: "web"
scheme: "http"
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
workload:
containers:
nginx:
image: nginx:v1
command:
- /bin/sh
- -c
- echo hi
args:
- /bin/sh
- -c
- echo hi
env:
env1: VALUE
env2: secret://sec-name/key
workingDir: /tmp
readinessProbe:
probeHandler:
url: http://localhost:80
initialDelaySeconds: 10
replicas: 2
type: Deployment
monitoring:
interval: 30s
timeout: 15s
path: /metrics
port: web
scheme: http
helloworld:
workload:
containers:
nginx:
image: nginx:v1
command:
- /bin/sh
- -c
- echo hi
args:
- /bin/sh
- -c
- echo hi
env:
env1: VALUE
env2: secret://sec-name/key
workingDir: /tmp
readinessProbe:
probeHandler:
url: http://localhost:80
initialDelaySeconds: 10
replicas: 2
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.1" }
catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.2" }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import catalog.models.schema.v1.workload.container as c
import catalog.models.schema.v1.workload.container.probe as p
import catalog.models.schema.v1.monitoring as m

ac.AppConfiguration {
# base.k declares reusable configurations for all stacks.
helloworld: ac.AppConfiguration {
workload: wl.Service {
containers: {
"nginx": c.Container {
Expand Down Expand Up @@ -34,12 +35,4 @@ ac.AppConfiguration {
# Set the replicas
replicas: 2
}
# Add the monitoring configuration backed by Prometheus
monitoring: m.Prometheus{
interval: "30s"
timeout: "15s"
path: "/metrics"
port: "web"
scheme: "http"
}
}
2 changes: 1 addition & 1 deletion pkg/api/test_data/test_run_tar_in_path/expected.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"demo": {"apiVersion": "apps/v1", "kind": "Deployment", "metadata": {"name": "nginx-deployment"}, "spec": {"replicas": 3, "selector": {"matchLabels": {"app": "nginx"}}, "template": {"metadata": {"labels": {"app": "nginx"}}, "spec": {"containers": [{"image": "nginx:1.14.2", "name": "nginx", "ports": [{"containerPort": 80}]}]}}}}}]
{"demo":{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"name":"nginx-deployment"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"nginx:1.14.2","name":"nginx","ports":[{"containerPort":80}]}]}}}}}

0 comments on commit a4ee5ad

Please sign in to comment.