Skip to content

Commit

Permalink
fixing some feedback from review
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <[email protected]>
  • Loading branch information
jjbustamante committed Dec 20, 2023
1 parent 16e645d commit 3c598f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/archive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func testArchive(t *testing.T, when spec.G, it spec.S) {
h.AssertOnTarEntries(t, outputFilename,
"/nested/dir/original-file",
"/nested/dir/original-file-2",
h.HardLinks(),
h.AreEquivalentHardLinks(),
)
})
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/buildpack/buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ version = "1.2.3"
os.RemoveAll(filepath.Join(bpRootFolder, "original-file-2"))
})

it.Focus("hardlink is preserved in the output tar file", func() {
it("hardlink is preserved in the output tar file", func() {
bp, err := buildpack.FromBuildpackRootBlob(
blob.NewBlob(bpRootFolder),
archive.DefaultTarWriterFactory(),
Expand All @@ -540,7 +540,7 @@ version = "1.2.3"
h.AssertOnTarEntries(t, tarPath,
"/cnb/buildpacks/bp.one/1.2.3/original-file",
"/cnb/buildpacks/bp.one/1.2.3/original-file-2",
h.HardLinks(),
h.AreEquivalentHardLinks(),
)
})
})
Expand Down
2 changes: 1 addition & 1 deletion testhelpers/tar_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func SymlinksTo(expectedTarget string) TarEntryAssertion {
}
}

func HardLinks() TarEntriesAssertion {
func AreEquivalentHardLinks() TarEntriesAssertion {
return func(t *testing.T, header1 *tar.Header, _ []byte, header2 *tar.Header, _ []byte) {
t.Helper()
if header1.Typeflag != tar.TypeLink && header2.Typeflag != tar.TypeLink {
Expand Down

0 comments on commit 3c598f4

Please sign in to comment.