Skip to content

Commit

Permalink
remove symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
somtochiama committed Aug 22, 2022
1 parent 206fe99 commit ac58fb7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions oci/client/internal/fs/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func TestMain(m *testing.M) {
}

os.MkdirAll("testdata/symlinks", 0o755)
defer os.RemoveAll("testdata/symlinks")

for _, sl := range symlinks {
err := os.Symlink(sl.oldPath, sl.newPath)
Expand All @@ -50,7 +49,13 @@ func TestMain(m *testing.M) {
}
}

os.Exit(m.Run())
code := m.Run()

err := os.RemoveAll("testdata/symlinks")
if err != nil {
panic(fmt.Errorf("unable to remove symlink directory: %v", err))
}
os.Exit(code)
}

func TestRenameWithFallback(t *testing.T) {
Expand Down

0 comments on commit ac58fb7

Please sign in to comment.