Skip to content

Commit

Permalink
Don't use all of tempdir as podman's --tmpdir
Browse files Browse the repository at this point in the history
... because (podman system reset) will delete all of it,
interfering with the test storing other data in the directory.

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Jan 22, 2025
1 parent abea0de commit b118d64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/e2e/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ var (
_ = BeforeEach(func() {
tempdir, err = os.MkdirTemp(GlobalTmpDir, "subtest-")
Expect(err).ToNot(HaveOccurred())
podmanTest = PodmanTestCreate(tempdir)
podmanTempDir := filepath.Join(tempdir, "p")
err = os.Mkdir(podmanTempDir, 0o700)
Expect(err).ToNot(HaveOccurred())
podmanTest = PodmanTestCreate(podmanTempDir)
podmanTest.Setup()
// see GetSafeIPAddress() below
safeIPOctets[0] = uint8(GinkgoT().ParallelProcess()) + 128
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/run_transient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var _ = Describe("Podman run with volumes", func() {
containerStorageDir = filepath.Join(podmanTest.Root, podmanTest.ImageCacheFS+"-containers")
dbDir = filepath.Join(podmanTest.Root, "libpod")
runContainerStorageDir = filepath.Join(podmanTest.RunRoot, podmanTest.ImageCacheFS+"-containers")
runDBDir = tempdir
runDBDir = podmanTest.TempDir
})

It("podman run with no transient-store", func() {
Expand Down

0 comments on commit b118d64

Please sign in to comment.