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 } 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)