From 013f7e81158ceffeb4022450d6b4973aab5f6164 Mon Sep 17 00:00:00 2001 From: iifrach Date: Sun, 18 Aug 2024 16:15:08 +0300 Subject: [PATCH] Tear down in custom policies integration test --- .../test_custom_policies_integration.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/common/integration_features/test_custom_policies_integration.py b/tests/common/integration_features/test_custom_policies_integration.py index ecef1b768bc..46300323c8b 100644 --- a/tests/common/integration_features/test_custom_policies_integration.py +++ b/tests/common/integration_features/test_custom_policies_integration.py @@ -7,7 +7,8 @@ CustomPoliciesIntegration from checkov.common.bridgecrew.platform_integration import BcPlatformIntegration from checkov.common.checks_infra.checks_parser import GraphCheckParser -from checkov.common.checks_infra.registry import Registry, get_all_graph_checks_registries, get_graph_checks_registry +from checkov.common.checks_infra.registry import Registry, get_all_graph_checks_registries, get_graph_checks_registry, \ + GraphSupportedIACFrameworks from checkov.common.models.enums import CheckResult from checkov.common.output.record import Record from checkov.common.output.report import Report @@ -19,10 +20,8 @@ class TestCustomPoliciesIntegration(unittest.TestCase): def tearDown(self) -> None: - get_graph_checks_registry("cloudformation").checks = [] - get_graph_checks_registry("terraform").checks = [] - get_graph_checks_registry("kubernetes").checks = [] - get_graph_checks_registry("bicep").checks = [] + for framework in GraphSupportedIACFrameworks: + get_graph_checks_registry(framework.value.lower()).checks = [] def test_integration_valid(self): instance = BcPlatformIntegration()