From 85beb06fd7c3d254d4d3148cf4034f8c8f92044f Mon Sep 17 00:00:00 2001 From: Amir Malka Date: Mon, 6 Jan 2025 14:59:09 +0200 Subject: [PATCH] hardcoded helm chart version Signed-off-by: Amir Malka --- configurations/system/tests_cases/vuln_scan_tests.py | 4 ++++ tests_scripts/helm/vuln_scan.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configurations/system/tests_cases/vuln_scan_tests.py b/configurations/system/tests_cases/vuln_scan_tests.py index 1e85735e..5f2fa02b 100644 --- a/configurations/system/tests_cases/vuln_scan_tests.py +++ b/configurations/system/tests_cases/vuln_scan_tests.py @@ -136,6 +136,10 @@ def vuln_scan_trigger_scan_public_registry_excluded(): return TestConfiguration( name=inspect.currentframe().f_code.co_name, test_obj=VulnerabilityScanningRegistry, + + # This test is forced to use version 1.24.2 of the helm chart since this is the last version which supports the old registry scan API + # Please remove this test once the BE will stop supporting this functionality') + helm_branch="kubescape-operator-1.24.2", deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"), service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"), properties={'http': True}, # https://hub.armosec.io/docs/registry-vulnerability-scan diff --git a/tests_scripts/helm/vuln_scan.py b/tests_scripts/helm/vuln_scan.py index fedcbd43..bc7e62dc 100644 --- a/tests_scripts/helm/vuln_scan.py +++ b/tests_scripts/helm/vuln_scan.py @@ -349,6 +349,10 @@ def setup_phase(self, cluster, namespace): return secret_data, registry def start(self): + helm_branch = self.test_obj.kwargs['helm_branch'] if 'helm_branch' in self.test_obj.kwargs else None + if helm_branch and helm_branch != "": + Logger.logger.info(f'using helm branch from test definition: {helm_branch}') + self.helm_branch = helm_branch cluster, namespace = self.setup_helm_chart() secret_data, registry = self.setup_phase(cluster, namespace)