Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 3a3586b

Browse files
CloudFormation: make test_fn_find_in_map_with_nested_ref_change_mapping region-agnostic (#13700)
1 parent 3bd884b commit 3a3586b

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

tests/aws/services/cloudformation/test_change_set_mappings.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,17 @@ def test_fn_find_in_map_with_nested_ref_change_mapping(
370370
self,
371371
snapshot,
372372
capture_update_process,
373+
region_name,
374+
secondary_region_name,
373375
):
374376
name1 = f"topic-name-1-{long_uid()}"
375377
snapshot.add_transformer(RegexTransformer(name1, "topic-name-1"))
376378

377379
template_1 = {
378380
"Mappings": {
379381
"RegionMap": {
380-
"us-east-1": {"value": "east-value-1"},
381-
"us-west-2": {"value": "west-value-1"},
382+
region_name: {"value": "value-1"},
383+
secondary_region_name: {"value": "value-2"},
382384
}
383385
},
384386
"Resources": {
@@ -402,8 +404,8 @@ def test_fn_find_in_map_with_nested_ref_change_mapping(
402404
template_2 = {
403405
"Mappings": {
404406
"RegionMap": {
405-
"us-east-1": {"value": "east-value-2"}, # Changed
406-
"us-west-2": {"value": "west-value-2"}, # Changed
407+
region_name: {"value": "value-3"}, # changed
408+
secondary_region_name: {"value": "value-4"}, # changed
407409
}
408410
},
409411
"Resources": {

tests/aws/services/cloudformation/test_change_set_mappings.snapshot.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@
28342834
}
28352835
},
28362836
"tests/aws/services/cloudformation/test_change_set_mappings.py::TestChangeSetMappings::test_fn_find_in_map_with_nested_ref_change_mapping": {
2837-
"recorded-date": "02-02-2026, 11:43:11",
2837+
"recorded-date": "04-02-2026, 11:54:54",
28382838
"recorded-content": {
28392839
"create-change-set-1": {
28402840
"Id": "arn:<partition>:cloudformation:<region>:111111111111:changeSet/<resource:1>",
@@ -2858,7 +2858,7 @@
28582858
"Action": "Add",
28592859
"AfterContext": {
28602860
"Properties": {
2861-
"DisplayName": "east-value-1",
2861+
"DisplayName": "value-1",
28622862
"TopicName": "topic-name-1"
28632863
}
28642864
},
@@ -2971,13 +2971,13 @@
29712971
"Action": "Modify",
29722972
"AfterContext": {
29732973
"Properties": {
2974-
"DisplayName": "east-value-2",
2974+
"DisplayName": "value-3",
29752975
"TopicName": "topic-name-1"
29762976
}
29772977
},
29782978
"BeforeContext": {
29792979
"Properties": {
2980-
"DisplayName": "east-value-1",
2980+
"DisplayName": "value-1",
29812981
"TopicName": "topic-name-1"
29822982
}
29832983
},
@@ -2986,10 +2986,10 @@
29862986
"ChangeSource": "DirectModification",
29872987
"Evaluation": "Static",
29882988
"Target": {
2989-
"AfterValue": "east-value-2",
2989+
"AfterValue": "value-3",
29902990
"Attribute": "Properties",
29912991
"AttributeChangeType": "Modify",
2992-
"BeforeValue": "east-value-1",
2992+
"BeforeValue": "value-1",
29932993
"Name": "DisplayName",
29942994
"Path": "/Properties/DisplayName",
29952995
"RequiresRecreation": "Never"

tests/aws/services/cloudformation/test_change_set_mappings.validation.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
}
1919
},
2020
"tests/aws/services/cloudformation/test_change_set_mappings.py::TestChangeSetMappings::test_fn_find_in_map_with_nested_ref_change_mapping": {
21-
"last_validated_date": "2026-02-02T11:43:11+00:00",
21+
"last_validated_date": "2026-02-04T11:54:54+00:00",
2222
"durations_in_seconds": {
2323
"setup": 0.61,
24-
"call": 90.09,
24+
"call": 91.81,
2525
"teardown": 0.32,
26-
"total": 91.02
26+
"total": 92.74
2727
}
2828
},
2929
"tests/aws/services/cloudformation/test_change_set_mappings.py::TestChangeSetMappings::test_mapping_addition_with_resource": {

0 commit comments

Comments
 (0)