From 398cf24e9c4df5fbe2521c4662ed186f9c86d06f Mon Sep 17 00:00:00 2001 From: Vichy Meas Date: Fri, 2 Oct 2026 18:15:54 +0000 Subject: [PATCH] fix: collect CDK local-invoke integration tests tests/integration/local/invoke/invoke_cdk_templates.py lacked the test_ filename prefix, so pytest never collected it and it was imported nowhere. Its CDK local-invoke test classes (TestCDKSynthesizedTemplate, TestCDKSynthesizedTemplatesImageFunctions, TestRuntimeFunctionConstructs, TestCDKLayerVersion) had never run in CI. Rename invoke_cdk_templates.py -> test_invoke_cdk_templates.py so the 17 CDK local-invoke tests are collected. Fix two call sites that only parsed because the file never ran: super().get_build_command_list(cls, ...) and super().run_command(cls, ...) now call the module-level get_build_command_list(template_path=...) / run_command(command_list=...) helpers from tests.testing_utils. --- ...{invoke_cdk_templates.py => test_invoke_cdk_templates.py} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename tests/integration/local/invoke/{invoke_cdk_templates.py => test_invoke_cdk_templates.py} (97%) diff --git a/tests/integration/local/invoke/invoke_cdk_templates.py b/tests/integration/local/invoke/test_invoke_cdk_templates.py similarity index 97% rename from tests/integration/local/invoke/invoke_cdk_templates.py rename to tests/integration/local/invoke/test_invoke_cdk_templates.py index 4348bfc7c3..d717e0459e 100644 --- a/tests/integration/local/invoke/invoke_cdk_templates.py +++ b/tests/integration/local/invoke/test_invoke_cdk_templates.py @@ -13,6 +13,7 @@ from samcli.local.docker.utils import get_validated_container_client from tests.integration.local.invoke.invoke_integ_base import InvokeIntegBase from tests.integration.local.invoke.test_integrations_cli import TestLayerVersionBase +from tests.testing_utils import get_build_command_list, run_command class TestCDKSynthesizedTemplate(InvokeIntegBase): @@ -139,8 +140,8 @@ def setUpClass(cls): # We only need to create these images once # We remove them after they are no longer used super(TestCDKSynthesizedTemplatesImageFunctions, cls).setUpClass() - build_command_list = super().get_build_command_list(cls, template_path=cls.template_path) - super().run_command(cls, command_list=build_command_list) + build_command_list = get_build_command_list(template_path=cls.template_path) + run_command(command_list=build_command_list) def tearDown(self) -> None: # Tear down a unique image resource after it is finished being used