1
1
variables {
2
- root_modules_path = " ./tests/fixtures/multi-instance"
2
+ root_modules_path = " ./tests/fixtures/multi-instance"
3
3
common_config_file = " common.yaml"
4
4
github_enterprise = {
5
5
namespace = " masterpointio"
6
6
}
7
- repository = " terraform-spacelift-automation"
7
+ repository = " terraform-spacelift-automation"
8
8
all_root_modules_enabled = true
9
- aws_integration_enabled = false
9
+ aws_integration_enabled = false
10
10
before_init = [
11
11
" echo 'Hello'"
12
12
]
@@ -461,7 +461,7 @@ run "test_labels_are_created_correctly" {
461
461
command = plan
462
462
463
463
assert {
464
- condition = contains (local. labels [" root-module-a-test" ], " nobackend" )
464
+ condition = contains (local. labels [" root-module-a-test" ], " nobackend" )
465
465
error_message = " Global labels were not created correctly: ${ jsonencode (local. labels )} "
466
466
}
467
467
}
@@ -471,7 +471,7 @@ run "test_root_module_fileset_collects_all_root_modules" {
471
471
command = plan
472
472
473
473
assert {
474
- condition = contains (local. _all_root_modules, " root-module-a" )
474
+ condition = contains (local. _all_root_modules, " root-module-a" )
475
475
error_message = " Root module fileset was not created correctly: ${ jsonencode (local. _all_root_modules)} "
476
476
}
477
477
}
@@ -481,7 +481,7 @@ run "test_common_labels_are_appended_to_stack_labels" {
481
481
command = plan
482
482
483
483
assert {
484
- condition = contains (local. configs [" root-module-a-test" ]. stack_settings . labels , " common_label" ) && contains (local. configs [" root-module-a-test" ]. stack_settings . labels , " test_label" )
484
+ condition = contains (local. configs [" root-module-a-test" ]. stack_settings . labels , " common_label" ) && contains (local. configs [" root-module-a-test" ]. stack_settings . labels , " test_label" )
485
485
error_message = " Common labels were not merged correctly: ${ jsonencode (local. configs )} "
486
486
}
487
487
}
@@ -491,7 +491,7 @@ run "test_stacks_include_expected" {
491
491
command = plan
492
492
493
493
assert {
494
- condition = contains (local. stacks , " root-module-a-test" )
494
+ condition = contains (local. stacks , " root-module-a-test" )
495
495
error_message = " Stack names were not created correctly: ${ jsonencode (local. stacks )} "
496
496
}
497
497
}
@@ -511,7 +511,7 @@ run "test_folder_labels_are_correct_format" {
511
511
command = plan
512
512
513
513
assert {
514
- condition = contains (local. _folder_labels[" root-module-a-test" ], " folder:root-module-a/test" )
514
+ condition = contains (local. _folder_labels[" root-module-a-test" ], " folder:root-module-a/test" )
515
515
error_message = " Folder label was not created correctly for root-module-a: ${ jsonencode (local. _folder_labels)} "
516
516
}
517
517
}
@@ -521,7 +521,7 @@ run "test_workspace_when_default_tf_workspace_enabled_is_false" {
521
521
command = plan
522
522
523
523
assert {
524
- condition = local. configs [" root-module-a-test" ]. terraform_workspace == " test"
524
+ condition = local. configs [" root-module-a-test" ]. terraform_workspace == " test"
525
525
error_message = " Terraform workspace was not set correctly when default_tf_workspace_enabled is false: ${ jsonencode (local. configs )} "
526
526
}
527
527
}
@@ -531,7 +531,7 @@ run "test_workspace_when_default_tf_workspace_enabled" {
531
531
command = plan
532
532
533
533
assert {
534
- condition = local. configs [" root-module-a-default-example" ]. terraform_workspace == " default"
534
+ condition = local. configs [" root-module-a-default-example" ]. terraform_workspace == " default"
535
535
error_message = " Default Terraform workspace was not used correctly: ${ jsonencode (local. configs )} "
536
536
}
537
537
}
@@ -541,7 +541,7 @@ run "test_administrative_label_is_added_to_stack" {
541
541
command = plan
542
542
543
543
assert {
544
- condition = contains (local. labels [" root-module-a-default-example" ], " administrative" )
544
+ condition = contains (local. labels [" root-module-a-default-example" ], " administrative" )
545
545
error_message = " Administrative label was not added to the stack: ${ jsonencode (local. labels )} "
546
546
}
547
547
}
@@ -551,7 +551,7 @@ run "test_administrative_label_is_not_added_to_stack_when_not_administrative" {
551
551
command = plan
552
552
553
553
assert {
554
- condition = ! contains (local. labels [" root-module-a-test" ], " administrative" )
554
+ condition = ! contains (local. labels [" root-module-a-test" ], " administrative" )
555
555
error_message = " Administrative label was added to the stack when it should not have been: ${ jsonencode (local. labels )} "
556
556
}
557
557
}
@@ -561,7 +561,7 @@ run "test_depends_on_label_is_added_to_stack" {
561
561
command = plan
562
562
563
563
assert {
564
- condition = contains (local. labels [" root-module-a-test" ], " depends-on:spacelift-automation-default" )
564
+ condition = contains (local. labels [" root-module-a-test" ], " depends-on:spacelift-automation-default" )
565
565
error_message = " Depends-on label was not added to the stack: ${ jsonencode (local. labels )} "
566
566
}
567
567
}
@@ -571,7 +571,7 @@ run "test_before_init_excludes_the_expected_tfvars_copy_command_when_tfvars_are_
571
571
command = plan
572
572
573
573
assert {
574
- condition = ! contains (local. before_init [" root-module-a-default-example" ], " cp tfvars/default-example.tfvars spacelift.auto.tfvars" )
574
+ condition = ! contains (local. before_init [" root-module-a-default-example" ], " cp tfvars/default-example.tfvars spacelift.auto.tfvars" )
575
575
error_message = " Before_init was not created correctly: ${ jsonencode (local. before_init )} "
576
576
}
577
577
}
@@ -581,7 +581,7 @@ run "test_before_init_includes_the_expected_tfvars_copy_command" {
581
581
command = plan
582
582
583
583
assert {
584
- condition = contains (local. before_init [" root-module-a-test" ], " cp tfvars/test.tfvars spacelift.auto.tfvars" )
584
+ condition = contains (local. before_init [" root-module-a-test" ], " cp tfvars/test.tfvars spacelift.auto.tfvars" )
585
585
error_message = " Before_init was not created correctly: ${ jsonencode (local. before_init )} "
586
586
}
587
587
}
@@ -591,7 +591,7 @@ run "test_before_init_includes_the_default_before_init_and_stack_before_init" {
591
591
command = plan
592
592
593
593
assert {
594
- condition = contains (local. before_init [" root-module-a-default-example" ], " echo 'Hello'" ) && contains (local. before_init [" root-module-a-default-example" ], " echo 'before_init'" )
594
+ condition = contains (local. before_init [" root-module-a-default-example" ], " echo 'Hello'" ) && contains (local. before_init [" root-module-a-default-example" ], " echo 'before_init'" )
595
595
error_message = " Before_init was not created correctly: ${ jsonencode (local. before_init )} "
596
596
}
597
597
}
0 commit comments