From dee1804dfdfb9e425db496a91e0088b4595602d2 Mon Sep 17 00:00:00 2001 From: Ryan King Date: Fri, 27 Jul 2018 13:58:10 -0700 Subject: [PATCH] remove shared-infra --- apply/apply_test.go | 4 ++-- fogg.json | 1 - plan/fixtures/full.json | 4 ++-- plan/plan_test.go | 15 +++++++++++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/apply/apply_test.go b/apply/apply_test.go index 552efc288..1e0023c4f 100644 --- a/apply/apply_test.go +++ b/apply/apply_test.go @@ -260,8 +260,8 @@ func TestCalculateLocalPath(t *testing.T) { {"foo/bar", "bam/baz", "../../bam/baz"}, { "foo/bar", - "git@github.com:chanzuckerberg/shared-infra//terraform/modules/aws-env?ref=v0.10.0", - "git@github.com:chanzuckerberg/shared-infra//terraform/modules/aws-env?ref=v0.10.0", + "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v1.30.0", + "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v1.30.0", }, {"foo/bar", "github.com/asdf/jkl", "github.com/asdf/jkl"}, // TODO modules from the registry don't work because it is diff --git a/fogg.json b/fogg.json index e3deca091..524f7f8ba 100644 --- a/fogg.json +++ b/fogg.json @@ -4,7 +4,6 @@ "aws_profile": "asdf", "infra_bucket": "asdf", "project": "asdf", - "shared_infra_base": "git@github.com:chanzuckerberg/shared-infra//", "terraform_version": "0.11.0", "owner": "foo@example.com" }, diff --git a/plan/fixtures/full.json b/plan/fixtures/full.json index e20487ee6..970f7c8b7 100644 --- a/plan/fixtures/full.json +++ b/plan/fixtures/full.json @@ -22,8 +22,8 @@ "staging":{ "type": "aws", "components": { - "cloud-env": { - "module_source": "git@github.com:chanzuckerberg/shared-infra//terraform/modules/aws-env?ref=v0.10.0" + "vpc": { + "module_source": "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v1.30.0" }, "comp1": {}, "comp2": {} diff --git a/plan/plan_test.go b/plan/plan_test.go index d8a374d9a..f591d56aa 100644 --- a/plan/plan_test.go +++ b/plan/plan_test.go @@ -6,9 +6,17 @@ import ( "testing" "github.com/chanzuckerberg/fogg/config" + log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" ) +func init() { + log.SetLevel(log.DebugLevel) + formatter := &log.TextFormatter{ + DisableTimestamp: true, + } + log.SetFormatter(formatter) +} func TestResolveRequired(t *testing.T) { resolved := resolveRequired("def", nil) assert.Equal(t, "def", resolved) @@ -78,8 +86,11 @@ func TestPlanBasic(t *testing.T) { assert.NotNil(t, plan.Envs["staging"].Components) assert.Len(t, plan.Envs["staging"].Components, 3) - assert.NotNil(t, plan.Envs["staging"].Components["cloud-env"]) - assert.Equal(t, "git@github.com:chanzuckerberg/shared-infra//terraform/modules/aws-env?ref=v0.10.0", *plan.Envs["staging"].Components["cloud-env"].ModuleSource) + assert.NotNil(t, plan.Envs["staging"]) + assert.NotNil(t, plan.Envs["staging"].Components["vpc"]) + log.Debugf("%#v\n", plan.Envs["staging"].Components["vpc"].ModuleSource) + assert.NotNil(t, *plan.Envs["staging"].Components["vpc"].ModuleSource) + assert.Equal(t, "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v1.30.0", *plan.Envs["staging"].Components["vpc"].ModuleSource) assert.NotNil(t, plan.Envs["staging"].Components["comp1"]) assert.Equal(t, "0.100.0", plan.Envs["staging"].Components["comp1"].TerraformVersion)