File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed
Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ env.init() {
4747
4848 yq_set ' common' ' .clusterAdmin.users' ' ["admin@example.com"]'
4949
50+ yq_set ' common' ' .global.issuer' ' "letsencrypt-staging"'
5051 yq_set ' common' ' .issuers.letsencrypt.prod.email' ' "admin@.example.com"'
5152 yq_set ' common' ' .issuers.letsencrypt.staging.email' ' "admin@.example.com"'
5253
Original file line number Diff line number Diff line change 11[1m--- common-config.yaml[0m
22[1m+++ expected[0m
3- [36m@@ -22 ,7 +22 ,7 @@[0m
3+ [36m@@ -23 ,7 +23 ,7 @@[0m
44 global:
55 objectStorage:
66 ips:
1212[[33mck8s[0m] Diff found for .networkPolicies.global.objectStorage.ips in common-config.yaml (diff shows actions needed to be up to date)
1313[1m--- common-config.yaml[0m
1414[1m+++ expected[0m
15- [36m@@ -24 ,7 +24 ,7 @@[0m
15+ [36m@@ -25 ,7 +25 ,7 @@[0m
1616 ips:
1717 - set-me
1818 ports:
2424[[33mck8s[0m] Diff found for .networkPolicies.global.objectStorage.ports in common-config.yaml (diff shows actions needed to be up to date)
2525[1m--- common-config.yaml[0m
2626[1m+++ expected[0m
27- [36m@@ -27 ,7 +27 ,7 @@[0m
27+ [36m@@ -28 ,7 +28 ,7 @@[0m
2828 - set-me
2929 scIngress:
3030 ips:
3636[[33mck8s[0m] Diff found for .networkPolicies.global.scIngress.ips in common-config.yaml (diff shows actions needed to be up to date)
3737[1m--- common-config.yaml[0m
3838[1m+++ expected[0m
39- [36m@@ -30 ,7 +30 ,7 @@[0m
39+ [36m@@ -31 ,7 +31 ,7 @@[0m
4040 - set-me
4141 wcIngress:
4242 ips:
Original file line number Diff line number Diff line change 11name : validate
22tagsFile :
33 - static
4+ - validate
45functions :
56 setup_file : |-
67 load "../common/lib/gpg"
@@ -33,6 +34,21 @@ functions:
3334 run ck8s validate wc <<< $'y\n'
3435 assert_success
3536
37+ validate_schema : |-
38+ env.init "${@}"
39+
40+ run ck8s validate wc <<< $'y\n'
41+ assert_success
42+
43+ run yq_set 'wc' '.global.baseDomain' '"this is not a valid hostname"'
44+ run ck8s validate wc <<< $'y\n'
45+ assert_output --partial 'global.baseDomain'
46+
47+ run yq_set 'wc' '.global.baseDomain' '"this is not a valid hostname"'
48+ run ck8s validate wc <<< $'y\n'
49+ assert_output --partial '"this is not a valid hostname"'
50+
51+
3652 validate_template : |-
3753 env.init "${@}"
3854
@@ -59,6 +75,12 @@ tests:
5975 - target : prod
6076 - target : air-gapped
6177
78+ - function : validate_schema # cloud flavor
79+ tests :
80+ - target : dev
81+ - target : prod
82+ - target : air-gapped
83+
6284 - function : validate_template # cloud flavor
6385 tests :
6486 - target : dev
You can’t perform that action at this time.
0 commit comments