From b589f6e3bec2180b52da761f3b7ecde71d405ea0 Mon Sep 17 00:00:00 2001 From: ckunki Date: Thu, 29 Feb 2024 17:36:19 +0100 Subject: [PATCH] Reduced output of test_lint_cloudformation_templates --- .../aws/test_lint_cloudformation_templates.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test/unit/aws/test_lint_cloudformation_templates.py b/test/unit/aws/test_lint_cloudformation_templates.py index fa3379c2..7aad80c5 100644 --- a/test/unit/aws/test_lint_cloudformation_templates.py +++ b/test/unit/aws/test_lint_cloudformation_templates.py @@ -31,12 +31,14 @@ def validate_using_cfn_lint(tmp_path, cloudformation_yml): raise e -@pytest.mark.parametrize("template", [ - ci_codebuild_template(), - release_codebuild_template(), - ec2_template(), - vm_bucket_template(), - waf_template(), -]) -def test_lint_cloudformation_templates(tmp_path, template): - validate_using_cfn_lint(tmp_path, template) +TEMPLATES = { + "ci-codebuild": ci_codebuild_template(), + "release-codebuild": release_codebuild_template(), + "ec2": ec2_template(), + "vm-bucket": vm_bucket_template(), + "waf": waf_template(), +} + +@pytest.mark.parametrize("template_key", TEMPLATES) +def test_lint_cloudformation_templates(tmp_path, template_key): + validate_using_cfn_lint(tmp_path, TEMPLATES[template_key])