diff --git a/src/test/helm/deployment_alfa_host_test.yaml b/src/test/helm/deployment_alfa_host_test.yaml index d4332a4fdcf18d2f982a26b8773c5c13e2c1163c..2a17d3aafa95c7a6ed3bfad0b884ada19d0c4421 100644 --- a/src/test/helm/deployment_alfa_host_test.yaml +++ b/src/test/helm/deployment_alfa_host_test.yaml @@ -29,13 +29,15 @@ release: templates: - templates/deployment.yaml set: - baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev - bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: should set the alfa host + set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + bezeichner: helm asserts: - contains: path: spec.template.spec.containers[0].env @@ -44,6 +46,9 @@ tests: value: https://helm.test.sh.ozg-cloud.de - it: should use alfa host from values set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + bezeichner: helm alfaHost: https://hamburg.mein-kreis.de asserts: - contains: @@ -51,3 +56,16 @@ tests: content: name: ozgcloud_alfa_host value: https://hamburg.mein-kreis.de + - it: should fail if bezeichner is not set + set: + baseUrl: test.sh.ozg-cloud.de + asserts: + - failedTemplate: + errorMessage: "ozgcloud.bezeichner must be set" + - it: should fail if base url is not set + set: + ozgcloud: + bezeichner: helm + asserts: + - failedTemplate: + errorMessage: "baseUrl must be set" diff --git a/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml b/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml index 00929fdae1724409bff50cab5facd49ccc5017df..1b1e5f48bfd4a6d2d614387823f8cfee010bc7e7 100644 --- a/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml +++ b/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml @@ -31,36 +31,19 @@ templates: set: baseUrl: test.sh.ozg-cloud.de ozgcloud: - environment: dev bezeichner: helm - imagePullSecret: test-image-pull-secret tests: - it: should fail on missing environment set: - ozgcloud: - environment: + imagePullSecret: test-image-pull-secret asserts: - failedTemplate: errorMessage: ozgcloud.environment must be set - - it: should fail on missing imagePullSecret - set: - imagePullSecret: - asserts: - - failedTemplate: - errorMessage: imagePullSecret must be set - - it: should fail if bezeichner is not set + - it: should not fail on not missing environment and not missing imagepullsecret set: ozgcloud: - bezeichner: - asserts: - - failedTemplate: - errorMessage: "ozgcloud.bezeichner must be set" - - it: should fail if base url is not set - set: - baseUrl: + environment: dev + imagePullSecret: test-image-pull-secret asserts: - - failedTemplate: - errorMessage: "baseUrl must be set" - - it: should not fail on not missing required values - asserts: - - notFailedTemplate: { } + - notFailedTemplate: {} +