Skip to content

Commit

Permalink
Update integration tests with correct tar paths
Browse files Browse the repository at this point in the history
The current version of the TarballCompressor puts "./" at the beginning
of all entries, and also appends "/" to directory entries.

Signed-off-by: Nader Ziada <[email protected]>
  • Loading branch information
selzoc authored and nader-ziada committed Dec 12, 2024
1 parent 25fb89f commit 09bcac7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion integration/create_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,15 @@ var _ = Describe("release creation", func() {

releaseTarball := listTarballContents(fmt.Sprintf("%s/release.tgz", releaseDir))

expected := []string{"release.MF", "jobs", "jobs/job1.tgz", "packages", "packages/pkg1.tgz", "license.tgz", "LICENSE"}
expected := []string{
"./release.MF",
"./jobs/",
"./jobs/job1.tgz",
"./packages/",
"./packages/pkg1.tgz",
"./license.tgz",
"./LICENSE",
}
Expect(releaseTarball).To(Equal(expected))
})

Expand Down
8 changes: 4 additions & 4 deletions integration/finalize_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ blobstore:

fs.FileExists(releaseDir + expectedLicenseVersion)
releaseTarball := listTarballContents(fmt.Sprintf("%s/release.tgz", releaseDir))
Expect(releaseTarball).To(ContainElement("LICENSE"))
Expect(releaseTarball).To(ContainElement("./LICENSE"))

verifyDigest(releaseDir, expectedLicenseVersion)
})
Expand All @@ -263,7 +263,7 @@ blobstore:

fs.FileExists(releaseDir + expectedLicenseVersion)
releaseTarball := listTarballContents(fmt.Sprintf("%s/release.tgz", releaseDir))
Expect(releaseTarball).To(ContainElement("NOTICE"))
Expect(releaseTarball).To(ContainElement("./NOTICE"))

verifyDigest(releaseDir, expectedLicenseVersion)
})
Expand All @@ -286,8 +286,8 @@ blobstore:

fs.FileExists(releaseDir + expectedLicenseVersion)
releaseTarball := listTarballContents(fmt.Sprintf("%s/release.tgz", releaseDir))
Expect(releaseTarball).To(ContainElement("NOTICE"))
Expect(releaseTarball).To(ContainElement("LICENSE"))
Expect(releaseTarball).To(ContainElement("./NOTICE"))
Expect(releaseTarball).To(ContainElement("./LICENSE"))

verifyDigest(releaseDir, expectedLicenseVersion)
})
Expand Down

0 comments on commit 09bcac7

Please sign in to comment.