From 96d1e57191689c1c7dfddda4e158583e3c05b978 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 6 Dec 2019 10:52:02 -0500 Subject: [PATCH 1/2] fix type in state mv test --- command/state_mv_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/state_mv_test.go b/command/state_mv_test.go index 406afa412cfb..25addaefd5e5 100644 --- a/command/state_mv_test.go +++ b/command/state_mv_test.go @@ -249,7 +249,7 @@ func TestStateMv_instanceToNewResource(t *testing.T) { AttrsJSON: []byte(`{"id":"bar","foo":"value","bar":"value"}`), Status: states.ObjectReady, }, - addrs.ProviderConfig{Type: "test"}.Absolute(addrs.RootModuleInstance), + addrs.ProviderConfig{Type: addrs.NewLegacyProvider("test")}.Absolute(addrs.RootModuleInstance), ) }) statePath := testStateFile(t, state) From 42a2bb4da3e3bd4d67356e03aa4cb5c6aee5c2b4 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 6 Dec 2019 10:56:47 -0500 Subject: [PATCH 2/2] expand test tempdir symlinks to fix tests on macos --- command/command_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/command/command_test.go b/command/command_test.go index 9f0fa4381ae2..4f5acfe38117 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -100,6 +100,12 @@ func tempDir(t *testing.T) string { if err != nil { t.Fatalf("err: %s", err) } + + dir, err = filepath.EvalSymlinks(dir) + if err != nil { + t.Fatal(err) + } + if err := os.RemoveAll(dir); err != nil { t.Fatalf("err: %s", err) } @@ -486,6 +492,11 @@ func testTempDir(t *testing.T) string { t.Fatalf("err: %s", err) } + d, err = filepath.EvalSymlinks(d) + if err != nil { + t.Fatal(err) + } + return d }