From 11e0d796b588ccdb88ff596c6bcf18f55ccb4f31 Mon Sep 17 00:00:00 2001 From: Shahruk Khan Date: Sat, 9 Nov 2024 14:59:51 +0000 Subject: [PATCH] Remove erroneous Tags assignment --- src/cf2tf/conversion/overrides.py | 1 - tests/test_convert.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cf2tf/conversion/overrides.py b/src/cf2tf/conversion/overrides.py index b0d6021..7729208 100644 --- a/src/cf2tf/conversion/overrides.py +++ b/src/cf2tf/conversion/overrides.py @@ -53,7 +53,6 @@ def tag_conversion(_tc: "TemplateConverter", params: CFParams) -> CFParams: original_tags: ListType = params["Tags"] # type: ignore # Handle Cloudformation templates that generate Tags: [] if not original_tags: - params["tags"] = params["Tags"] del params["Tags"] return params diff --git a/tests/test_convert.py b/tests/test_convert.py index 13363dd..0321fa2 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -167,9 +167,8 @@ def test_perform_global_overrides(): assert result is empty_params assert "Tags" not in result - assert "tags" in result - assert isinstance(result["tags"], list) - assert [] == result["tags"] + assert "tags" not in result + assert {} == result params = {"Tags": [{"Key": "foo", "Value": "bar"}]} result = convert.perform_global_overrides("aws_s3_bucket", params, template)