Skip to content

Commit

Permalink
Merge pull request #309 from pjbgf/fix-action
Browse files Browse the repository at this point in the history
oci: Fix broken action
  • Loading branch information
Paulo Gomes committed Aug 8, 2022
2 parents 5b16241 + c2597a0 commit 7f5a5df
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
33 changes: 33 additions & 0 deletions oci/client/internal/fs/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,39 @@ var (
mu sync.Mutex
)

func TestMain(m *testing.M) {
symlinks := []struct {
oldPath string
newPath string
}{
{
oldPath: "C:/Users/fluxcd/go/src/github.com/golang/dep/internal/fs/testdata/test.file",
newPath: "testdata/symlinks/windows-file-symlink",
},
{
"/non/existing/file",
"testdata/symlinks/invalid-symlink",
},
}
for _, sl := range symlinks {
err := os.Symlink(sl.oldPath, sl.newPath)
if err != nil {
panic(err)
}
}

c := m.Run()

for _, sl := range symlinks {
err := os.Remove(sl.newPath)
if err != nil {
panic(err)
}
}

os.Exit(c)
}

func TestRenameWithFallback(t *testing.T) {
dir := t.TempDir()

Expand Down
1 change: 0 additions & 1 deletion oci/client/internal/fs/testdata/symlinks/invalid-symlink

This file was deleted.

This file was deleted.

0 comments on commit 7f5a5df

Please sign in to comment.