Skip to content

Commit

Permalink
Merge pull request #23596 from hashicorp/jbardin/fix-state-test
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
jbardin authored Dec 6, 2019
2 parents e341612 + 42a2bb4 commit b9d48d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion command/state_mv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b9d48d3

Please sign in to comment.