Skip to content

Commit

Permalink
remove shared-infra
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking authored and czimergebot committed Jul 27, 2018
1 parent 21dff3b commit dee1804
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apply/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion fogg.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"aws_profile": "asdf",
"infra_bucket": "asdf",
"project": "asdf",
"shared_infra_base": "[email protected]:chanzuckerberg/shared-infra//",
"terraform_version": "0.11.0",
"owner": "[email protected]"
},
Expand Down
4 changes: 2 additions & 2 deletions plan/fixtures/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {}
Expand Down
15 changes: 13 additions & 2 deletions plan/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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, "[email protected]: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)
Expand Down

0 comments on commit dee1804

Please sign in to comment.