Skip to content

Commit

Permalink
Test ignoring MacOS metadata files
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoster committed Oct 16, 2024
1 parent 868e38c commit af1229a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fileutil/tarball_compressor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ func createTestSymlink() (string, error) {
return symlinkPath, os.Symlink(symlinkTarget, symlinkPath)
}

func createMacOSMetadataFile() (string, error) {
path := filepath.Join(fixtureSrcDir(), ".DS_Store")
_, err := os.Create(path)
return path, err
}

func beDir() beDirMatcher {
return beDirMatcher{}
}
Expand Down Expand Up @@ -107,6 +113,10 @@ var _ = Describe("tarballCompressor", func() {
Expect(err).To(Succeed())
defer os.Remove(symlinkPath)

metadataPath, err := createMacOSMetadataFile()
Expect(err).To(Succeed())
defer os.Remove(metadataPath)

tgzName, err := compressor.CompressFilesInDir(srcDir)
Expect(err).ToNot(HaveOccurred())
defer os.Remove(tgzName)
Expand Down

0 comments on commit af1229a

Please sign in to comment.