expand test tempdir symlinks to fix tests on macos

This commit is contained in:
James Bardin 2019-12-06 10:56:47 -05:00
parent 96d1e57191
commit 42a2bb4da3

View File

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