From 87c8c9e5c66997eb065a01cd8a9d340538de6265 Mon Sep 17 00:00:00 2001 From: Shaun Date: Sat, 25 Mar 2017 12:08:01 +0000 Subject: [PATCH] add test for stackPolicy method --- commands/stack_test.go | 6 ++++++ examples/vpc/config.yml | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/commands/stack_test.go b/commands/stack_test.go index c79027d..4cd358f 100644 --- a/commands/stack_test.go +++ b/commands/stack_test.go @@ -84,6 +84,7 @@ func TestStack(t *testing.T) { t.Error(err) } } + } // TestDeploy - test deploy and terminate stack. @@ -120,6 +121,11 @@ func TestDeploy(t *testing.T) { t.Error(err) } + // Test Set Stack Policy + if err := teststack.stackPolicy(sess); err != nil { + t.Errorf("%s - [%s]", err, teststack.policy) + } + // Test Terminate Stack if err := teststack.terminate(sess); err != nil { t.Error(err) diff --git a/examples/vpc/config.yml b/examples/vpc/config.yml index 6949cec..aa7eff4 100644 --- a/examples/vpc/config.yml +++ b/examples/vpc/config.yml @@ -1,5 +1,5 @@ -region: "eu-west-1" -project: "daidokoro" +region: eu-west-1 +project: daidokoro global: tags: @@ -9,8 +9,11 @@ global: stacks: vpc: + # stack policy - url or raw json can be specified here + policy: https://s3-eu-west-1.amazonaws.com/daidokoro-dev/policies/stack.json + cf: - cidr: 10.10.0.0/16 + cidr: 10.11.0.0/16 subnet: depends_on: