Skip to content

Commit 40b8afe

Browse files
committed
add bats test for diff with raw template
1 parent 01ea93e commit 40b8afe

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

tests/suite.bats

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,45 @@ EOF
713713
assert_has_line "${STACKER_NAMESPACE}-vpc: complete (stack destroyed)"
714714
}
715715

716+
@test "stacker diff - raw template" {
717+
needs_aws
718+
719+
config1() {
720+
cat <<EOF
721+
namespace: ${STACKER_NAMESPACE}
722+
stacks:
723+
- name: vpc
724+
template_path: ../stacker/tests/fixtures/cfn_template.yaml
725+
variables:
726+
Param1: foobar
727+
EOF
728+
}
729+
730+
config2() {
731+
cat <<EOF
732+
namespace: ${STACKER_NAMESPACE}
733+
stacks:
734+
- name: vpc
735+
template_path: ../stacker/tests/fixtures/cfn_template.yaml
736+
variables:
737+
Param1: newbar
738+
EOF
739+
}
740+
741+
teardown() {
742+
stacker destroy --force <(config1)
743+
}
744+
745+
# Create the new stacks.
746+
stacker build <(config1)
747+
assert "$status" -eq 0
748+
749+
stacker diff <(config2)
750+
assert "$status" -eq 0
751+
assert_has_line "\-Param1 = foobar"
752+
assert_has_line "+Param1 = newbar"
753+
}
754+
716755
@test "stacker build - no parallelism" {
717756
needs_aws
718757

0 commit comments

Comments
 (0)