@@ -85,7 +85,7 @@ def test_terraform_init_integration_reconcile_account_with_new_account(
8585 state_template = "{{bucket_name}}" ,
8686 cloudformation_template = "cloudformation_template" ,
8787 cloudformation_import_template = "cloudformation_import_template" ,
88- tags = {"env" : "test" },
88+ default_tags = {"env" : "test" },
8989 )
9090
9191 aws_api .cloudformation .create_stack .assert_called_once_with (
@@ -119,7 +119,7 @@ def test_terraform_init_integration_reconcile_account_with_new_account_dry_run(
119119 state_template = "{{bucket_name}}" ,
120120 cloudformation_template = "cloudformation_template" ,
121121 cloudformation_import_template = "cloudformation_import_template" ,
122- tags = {"env" : "test" },
122+ default_tags = {"env" : "test" },
123123 )
124124
125125 aws_api .cloudformation .create_stack .assert_not_called ()
@@ -149,7 +149,7 @@ def test_terraform_init_integration_reconcile_account_when_import_stack(
149149 state_template = "{{bucket_name}}" ,
150150 cloudformation_template = "cloudformation_template" ,
151151 cloudformation_import_template = "cloudformation_import_template" ,
152- tags = {"env" : "test" },
152+ default_tags = {"env" : "test" },
153153 )
154154
155155 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -160,13 +160,23 @@ def test_terraform_init_integration_reconcile_account_when_import_stack(
160160 change_set_name = "import-existing-bucket" ,
161161 template_body = "cloudformation_import_template" ,
162162 parameters = {"BucketName" : "existing-bucket" },
163- tags = {"env" : "test" },
163+ tags = {
164+ "account_key" : "account_value" ,
165+ "common_key" : "final_common_value" ,
166+ "env" : "test" ,
167+ "payer_key" : "payer_value" ,
168+ },
164169 )
165170 aws_api .cloudformation .update_stack .assert_called_once_with (
166171 stack_name = "existing-bucket" ,
167172 template_body = "cloudformation_template" ,
168173 parameters = {"BucketName" : "existing-bucket" },
169- tags = {"env" : "test" },
174+ tags = {
175+ "account_key" : "account_value" ,
176+ "common_key" : "final_common_value" ,
177+ "env" : "test" ,
178+ "payer_key" : "payer_value" ,
179+ },
170180 )
171181 merge_request_manager .create_merge_request .assert_not_called ()
172182
@@ -188,7 +198,7 @@ def test_terraform_init_integration_reconcile_account_when_import_stack_dry_run(
188198 state_template = "{{bucket_name}}" ,
189199 cloudformation_template = "cloudformation_template" ,
190200 cloudformation_import_template = "cloudformation_import_template" ,
191- tags = {"env" : "test" },
201+ default_tags = {"env" : "test" },
192202 )
193203
194204 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -208,7 +218,12 @@ def test_terraform_init_integration_reconcile_account_when_tags_mismatch(
208218 account = next (a for a in aws_accounts if a .name == "terraform-state-already-set" )
209219 aws_api .cloudformation .get_stack .return_value = {
210220 "StackName" : "terraform-terraform-state-already-set" ,
211- "Tags" : [{"Key" : "env" , "Value" : "test-old" }],
221+ "Tags" : [
222+ {"Key" : "account_key" , "Value" : "account_value" },
223+ {"Key" : "common_key" , "Value" : "final_common_value" },
224+ {"Key" : "env" , "Value" : "test-old" },
225+ {"Key" : "payer_key" , "Value" : "payer_value" },
226+ ],
212227 }
213228
214229 intg .reconcile_account (
@@ -219,7 +234,7 @@ def test_terraform_init_integration_reconcile_account_when_tags_mismatch(
219234 state_template = "{{bucket_name}}" ,
220235 cloudformation_template = "cloudformation_template" ,
221236 cloudformation_import_template = "cloudformation_import_template" ,
222- tags = {"env" : "test" },
237+ default_tags = {"env" : "test" },
223238 )
224239
225240 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -229,7 +244,12 @@ def test_terraform_init_integration_reconcile_account_when_tags_mismatch(
229244 stack_name = "existing-bucket" ,
230245 template_body = "cloudformation_template" ,
231246 parameters = {"BucketName" : "existing-bucket" },
232- tags = {"env" : "test" },
247+ tags = {
248+ "account_key" : "account_value" ,
249+ "common_key" : "final_common_value" ,
250+ "env" : "test" ,
251+ "payer_key" : "payer_value" ,
252+ },
233253 )
234254 aws_api .cloudformation .create_stack .assert_not_called ()
235255 aws_api .cloudformation .get_template .assert_not_called ()
@@ -245,7 +265,12 @@ def test_terraform_init_integration_reconcile_account_when_tags_mismatch_dry_run
245265 account = next (a for a in aws_accounts if a .name == "terraform-state-already-set" )
246266 aws_api .cloudformation .get_stack .return_value = {
247267 "StackName" : "terraform-terraform-state-already-set" ,
248- "Tags" : [{"Key" : "env" , "Value" : "test-old" }],
268+ "Tags" : [
269+ {"Key" : "account_key" , "Value" : "account_value" },
270+ {"Key" : "common_key" , "Value" : "final_common_value" },
271+ {"Key" : "env" , "Value" : "test-old" },
272+ {"Key" : "payer_key" , "Value" : "payer_value" },
273+ ],
249274 }
250275
251276 intg .reconcile_account (
@@ -256,7 +281,7 @@ def test_terraform_init_integration_reconcile_account_when_tags_mismatch_dry_run
256281 state_template = "{{bucket_name}}" ,
257282 cloudformation_template = "cloudformation_template" ,
258283 cloudformation_import_template = "cloudformation_import_template" ,
259- tags = {"env" : "test" },
284+ default_tags = {"env" : "test" },
260285 )
261286
262287 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -277,7 +302,12 @@ def test_terraform_init_integration_reconcile_account_when_template_body_mismatc
277302 account = next (a for a in aws_accounts if a .name == "terraform-state-already-set" )
278303 aws_api .cloudformation .get_stack .return_value = {
279304 "StackName" : "terraform-terraform-state-already-set" ,
280- "Tags" : [{"Key" : "env" , "Value" : "test" }],
305+ "Tags" : [
306+ {"Key" : "account_key" , "Value" : "account_value" },
307+ {"Key" : "common_key" , "Value" : "final_common_value" },
308+ {"Key" : "env" , "Value" : "test" },
309+ {"Key" : "payer_key" , "Value" : "payer_value" },
310+ ],
281311 }
282312 aws_api .cloudformation .get_template_body .return_value = "old_template_body"
283313
@@ -289,7 +319,7 @@ def test_terraform_init_integration_reconcile_account_when_template_body_mismatc
289319 state_template = "{{bucket_name}}" ,
290320 cloudformation_template = "cloudformation_template" ,
291321 cloudformation_import_template = "cloudformation_import_template" ,
292- tags = {"env" : "test" },
322+ default_tags = {"env" : "test" },
293323 )
294324
295325 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -302,7 +332,12 @@ def test_terraform_init_integration_reconcile_account_when_template_body_mismatc
302332 stack_name = "existing-bucket" ,
303333 template_body = "cloudformation_template" ,
304334 parameters = {"BucketName" : "existing-bucket" },
305- tags = {"env" : "test" },
335+ tags = {
336+ "account_key" : "account_value" ,
337+ "common_key" : "final_common_value" ,
338+ "env" : "test" ,
339+ "payer_key" : "payer_value" ,
340+ },
306341 )
307342 aws_api .cloudformation .create_stack .assert_not_called ()
308343 merge_request_manager .create_merge_request .assert_not_called ()
@@ -317,7 +352,12 @@ def test_terraform_init_integration_reconcile_account_when_template_body_mismatc
317352 account = next (a for a in aws_accounts if a .name == "terraform-state-already-set" )
318353 aws_api .cloudformation .get_stack .return_value = {
319354 "StackName" : "terraform-terraform-state-already-set" ,
320- "Tags" : [{"Key" : "env" , "Value" : "test" }],
355+ "Tags" : [
356+ {"Key" : "account_key" , "Value" : "account_value" },
357+ {"Key" : "env" , "Value" : "test" },
358+ {"Key" : "common_key" , "Value" : "final_common_value" },
359+ {"Key" : "payer_key" , "Value" : "payer_value" },
360+ ],
321361 }
322362 aws_api .cloudformation .get_template_body .return_value = "old_template_body"
323363
@@ -329,7 +369,7 @@ def test_terraform_init_integration_reconcile_account_when_template_body_mismatc
329369 state_template = "{{bucket_name}}" ,
330370 cloudformation_template = "cloudformation_template" ,
331371 cloudformation_import_template = "cloudformation_import_template" ,
332- tags = {"env" : "test" },
372+ default_tags = {"env" : "test" },
333373 )
334374
335375 aws_api .cloudformation .get_stack .assert_called_once_with (
@@ -352,7 +392,12 @@ def test_terraform_init_integration_reconcile_account_when_no_changes(
352392 account = next (a for a in aws_accounts if a .name == "terraform-state-already-set" )
353393 aws_api .cloudformation .get_stack .return_value = {
354394 "StackName" : "terraform-terraform-state-already-set" ,
355- "Tags" : [{"Key" : "env" , "Value" : "test" }],
395+ "Tags" : [
396+ {"Key" : "account_key" , "Value" : "account_value" },
397+ {"Key" : "common_key" , "Value" : "final_common_value" },
398+ {"Key" : "env" , "Value" : "test" },
399+ {"Key" : "payer_key" , "Value" : "payer_value" },
400+ ],
356401 }
357402 aws_api .cloudformation .get_template_body .return_value = "cloudformation_template"
358403
@@ -364,7 +409,7 @@ def test_terraform_init_integration_reconcile_account_when_no_changes(
364409 state_template = "{{bucket_name}}" ,
365410 cloudformation_template = "cloudformation_template" ,
366411 cloudformation_import_template = "cloudformation_import_template" ,
367- tags = {"env" : "test" },
412+ default_tags = {"env" : "test" },
368413 )
369414
370415 aws_api .cloudformation .get_stack .assert_called_once_with (
0 commit comments