From 70a5b1b7343d90a118b1f918846258290fb5e3d0 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 27 Oct 2017 13:06:07 -0400 Subject: [PATCH] make terraform work with ModuleStorage --- terraform/terraform_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/terraform/terraform_test.go b/terraform/terraform_test.go index 3be9dea16..56af0ff3a 100644 --- a/terraform/terraform_test.go +++ b/terraform/terraform_test.go @@ -12,7 +12,6 @@ import ( "sync" "testing" - "github.com/hashicorp/go-getter" "github.com/hashicorp/terraform/config" "github.com/hashicorp/terraform/config/module" "github.com/hashicorp/terraform/helper/experiment" @@ -97,8 +96,11 @@ func testModule(t *testing.T, name string) *module.Tree { t.Fatalf("err: %s", err) } - s := &getter.FolderStorage{StorageDir: tempDir(t)} - if err := mod.Load(s, module.GetModeGet); err != nil { + s := &module.ModuleStorage{ + StorageDir: tempDir(t), + Mode: module.GetModeGet, + } + if err := mod.Load(s); err != nil { t.Fatalf("err: %s", err) } @@ -144,10 +146,11 @@ func testModuleInline(t *testing.T, config map[string]string) *module.Tree { } // Load the modules - modStorage := &getter.FolderStorage{ + modStorage := &module.ModuleStorage{ StorageDir: filepath.Join(cfgPath, ".tfmodules"), + Mode: module.GetModeGet, } - err = mod.Load(modStorage, module.GetModeGet) + err = mod.Load(modStorage) if err != nil { t.Errorf("Error downloading modules: %s", err) }