From c8bc4d451d6a517b3eeff53c5bf0a49f3840b07c Mon Sep 17 00:00:00 2001 From: Piotr Marcinkiewicz Date: Wed, 26 May 2021 09:45:45 +0200 Subject: Add test cases for Helm validation Issue-ID: SDC-3185 Signed-off-by: Piotr Marcinkiewicz Signed-off-by: Tomasz Wrobel Signed-off-by: Joanna Jeremicz Change-Id: Ic68907aa385e5a735d0948ca2177e6aac12b2e7b --- .../test/resources/Files/CNFs/helm-package-valid.zip | Bin 1151 -> 2423 bytes .../resources/Files/CNFs/helm-package-valid_expect | 1 + .../helm_validator/invalid/one_error_two_files.zip | Bin 0 -> 2028 bytes .../helm_validator/invalid/one_error_two_files_expect | 1 + .../package_invalid_nil_pointer_render_error.zip | Bin 0 -> 1197 bytes .../package_invalid_nil_pointer_render_error_expect | 1 + .../Files/CNFs/helm_validator/package_valid.zip | Bin 0 -> 1130 bytes .../Files/CNFs/helm_validator/valid_two_files.zip | Bin 0 -> 2004 bytes .../with_warnings/one_warning_two_files.zip | Bin 0 -> 2104 bytes .../with_warnings/one_warning_two_files_expect | 1 + .../ci/testSuites/backend/helmValidatorTests.xml | 6 ++++++ .../resources/ci/testSuites/backend/onapApiSanity.xml | 7 ++++++- .../ci/testSuites/frontend/helmValidatorTests.xml | 7 +++++++ 13 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm-package-valid_expect create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files.zip create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files_expect create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error.zip create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error_expect create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/package_valid.zip create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/valid_two_files.zip create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files.zip create mode 100644 integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files_expect (limited to 'integration-tests/src/test/resources') diff --git a/integration-tests/src/test/resources/Files/CNFs/helm-package-valid.zip b/integration-tests/src/test/resources/Files/CNFs/helm-package-valid.zip index 349a9ee0b2..a28a7c2b59 100644 Binary files a/integration-tests/src/test/resources/Files/CNFs/helm-package-valid.zip and b/integration-tests/src/test/resources/Files/CNFs/helm-package-valid.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm-package-valid_expect b/integration-tests/src/test/resources/Files/CNFs/helm-package-valid_expect new file mode 100644 index 0000000000..8923fa7865 --- /dev/null +++ b/integration-tests/src/test/resources/Files/CNFs/helm-package-valid_expect @@ -0,0 +1 @@ +"third.tgz":[{"level":"WARNING","message":"WARNING: [HELM VALIDATOR]: [WARNING] templates/: directory not found"}] diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files.zip b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files.zip new file mode 100644 index 0000000000..fe7925fe25 Binary files /dev/null and b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files_expect b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files_expect new file mode 100644 index 0000000000..d4b2ef4d2e --- /dev/null +++ b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/one_error_two_files_expect @@ -0,0 +1 @@ +"one_error.tgz":[{"level":"ERROR","message":"ERROR: [HELM VALIDATOR]: Error: template: mychartname/templates/test.yaml:2:18: executing \"mychartname/templates/test.yaml\" at <.Values.image.repository>: nil pointer evaluating interface {}.repository"},{"level":"WARNING","message":"WARNING: [HELM VALIDATOR]: [ERROR] templates/: template: mychartname/templates/test.yaml:2:18: executing \"mychartname/templates/test.yaml\" at <.Values.image.repository>: nil pointer evaluating interface {}.repository"}] diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error.zip b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error.zip new file mode 100644 index 0000000000..851ee27367 Binary files /dev/null and b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error_expect b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error_expect new file mode 100644 index 0000000000..b8d93186fb --- /dev/null +++ b/integration-tests/src/test/resources/Files/CNFs/helm_validator/invalid/package_invalid_nil_pointer_render_error_expect @@ -0,0 +1 @@ +"one-lint-one-render-error-apiVersion-v2.tgz":[{"level":"ERROR","message":"ERROR: [HELM VALIDATOR]: Error: template: mychartname/templates/test.yaml:2:18: executing \"mychartname/templates/test.yaml\" at <.Values.image.repository>: nil pointer evaluating interface {}.repository"},{"level":"WARNING","message":"WARNING: [HELM VALIDATOR]: [ERROR] templates/: template: mychartname/templates/test.yaml:2:18: executing \"mychartname/templates/test.yaml\" at <.Values.image.repository>: nil pointer evaluating interface {}.repository"}] diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/package_valid.zip b/integration-tests/src/test/resources/Files/CNFs/helm_validator/package_valid.zip new file mode 100644 index 0000000000..abe94e6616 Binary files /dev/null and b/integration-tests/src/test/resources/Files/CNFs/helm_validator/package_valid.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/valid_two_files.zip b/integration-tests/src/test/resources/Files/CNFs/helm_validator/valid_two_files.zip new file mode 100644 index 0000000000..508f3f8388 Binary files /dev/null and b/integration-tests/src/test/resources/Files/CNFs/helm_validator/valid_two_files.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files.zip b/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files.zip new file mode 100644 index 0000000000..76530d43a1 Binary files /dev/null and b/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files.zip differ diff --git a/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files_expect b/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files_expect new file mode 100644 index 0000000000..6e895ae278 --- /dev/null +++ b/integration-tests/src/test/resources/Files/CNFs/helm_validator/with_warnings/one_warning_two_files_expect @@ -0,0 +1 @@ +"one_warning.tgz":[{"level":"WARNING","message":"WARNING: [HELM VALIDATOR]: [WARNING] templates/: directory not found"}] diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml b/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml index e69785d397..01d4095153 100644 --- a/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml +++ b/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml @@ -5,6 +5,12 @@ + + + + + + diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml index 97537986cb..8ce016d09f 100644 --- a/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml +++ b/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml @@ -5,7 +5,12 @@ - + + + + + + diff --git a/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml b/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml index ac44641767..2e171e970f 100644 --- a/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml +++ b/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml @@ -6,6 +6,13 @@ + + + + + + + -- cgit 1.2.3-korg