diff --git a/stacker/plan.py b/stacker/plan.py index 406c73331..000878df9 100644 --- a/stacker/plan.py +++ b/stacker/plan.py @@ -59,7 +59,7 @@ def __repr__(self): return "" % (self.stack.fqn,) def __str__(self): - return self.stack.fqn + return self.stack.name def run(self): """Runs this step until it has completed successfully, or been diff --git a/stacker/tests/test_plan.py b/stacker/tests/test_plan.py index af888a8db..bdb5f1f49 100644 --- a/stacker/tests/test_plan.py +++ b/stacker/tests/test_plan.py @@ -37,7 +37,8 @@ class TestStep(unittest.TestCase): def setUp(self): stack = mock.MagicMock() - stack.fqn = "stack" + stack.name = "stack" + stack.fqn = "namespace-stack" self.step = Step(stack=stack, fn=None) def test_status(self): diff --git a/tests/suite.bats b/tests/suite.bats index 88837650e..e4897713e 100755 --- a/tests/suite.bats +++ b/tests/suite.bats @@ -82,7 +82,7 @@ stacks: EOF assert ! "$status" -eq 0 assert_has_line "MissingVariable: Variable \"PublicSubnets\" in blueprint \"vpc\" is missing" - assert_has_line "${STACKER_NAMESPACE}-vpc: failed (Variable \"PublicSubnets\" in blueprint \"vpc\" is missing)" + assert_has_line "vpc: failed (Variable \"PublicSubnets\" in blueprint \"vpc\" is missing)" } @test "stacker build - simple build" { @@ -108,20 +108,20 @@ EOF stacker build <(config) assert "$status" -eq 0 assert_has_line "Using default AWS provider mode" - assert_has_line "${STACKER_NAMESPACE}-vpc: submitted (creating new stack)" - assert_has_line "${STACKER_NAMESPACE}-vpc: complete (creating new stack)" + assert_has_line "vpc: submitted (creating new stack)" + assert_has_line "vpc: complete (creating new stack)" # Perform a noop update to the stacks, in interactive mode. stacker build -i <(config) assert "$status" -eq 0 assert_has_line "Using interactive AWS provider mode" - assert_has_line "${STACKER_NAMESPACE}-vpc: skipped (nochange)" + assert_has_line "vpc: skipped (nochange)" # Cleanup stacker destroy --force <(config) assert "$status" -eq 0 - assert_has_line "${STACKER_NAMESPACE}-vpc: submitted (submitted for destruction)" - assert_has_line "${STACKER_NAMESPACE}-vpc: complete (stack destroyed)" + assert_has_line "vpc: submitted (submitted for destruction)" + assert_has_line "vpc: complete (stack destroyed)" } @test "stacker info - simple info" { @@ -147,7 +147,7 @@ EOF stacker info <(config) assert "$status" -eq 0 assert_has_line "Outputs for stacks: ${STACKER_NAMESPACE}" - assert_has_line "${STACKER_NAMESPACE}-vpc:" + assert_has_line "vpc:" assert_has_line "DummyId: dummy-1234" } @@ -177,8 +177,8 @@ EOF assert_has_line "Using default AWS provider mode" for stack in vpc bastion; do - assert_has_line "${STACKER_NAMESPACE}-${stack}: submitted (creating new stack)" - assert_has_line "${STACKER_NAMESPACE}-${stack}: complete (creating new stack)" + assert_has_line "${stack}: submitted (creating new stack)" + assert_has_line "${stack}: complete (creating new stack)" done } @@ -250,16 +250,16 @@ EOF stacker build <(config1) assert "$status" -eq 0 assert_has_line "Using default AWS provider mode" - assert_has_line "${STACKER_NAMESPACE}-vpc: submitted (creating new stack)" - assert_has_line "${STACKER_NAMESPACE}-vpc: complete (creating new stack)" - assert_has_line "${STACKER_NAMESPACE}-bastion: submitted (creating new stack)" - assert_has_line "${STACKER_NAMESPACE}-bastion: complete (creating new stack)" + assert_has_line "vpc: submitted (creating new stack)" + assert_has_line "vpc: complete (creating new stack)" + assert_has_line "bastion: submitted (creating new stack)" + assert_has_line "bastion: complete (creating new stack)" # Attempt an update to all stacks, but skip the vpc update. stacker build -i <(config2) <<< $'n\ny\n' assert "$status" -eq 0 - assert_has_line "${STACKER_NAMESPACE}-vpc: skipped (canceled execution)" - assert_has_line "${STACKER_NAMESPACE}-bastion: submitted (updating existing stack)" + assert_has_line "vpc: skipped (canceled execution)" + assert_has_line "bastion: submitted (updating existing stack)" } @test "stacker build - no namespace" { @@ -269,7 +269,8 @@ EOF cat <