Skip to content

Commit 27ccfef

Browse files
committed
Don't use all of tempdir as podman's --tmpdir
... 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]>
1 parent 2d42b13 commit 27ccfef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/e2e/common_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ var (
114114
_ = BeforeEach(func() {
115115
tempdir, err = os.MkdirTemp(GlobalTmpDir, "subtest-")
116116
Expect(err).ToNot(HaveOccurred())
117-
podmanTest = PodmanTestCreate(tempdir)
117+
podmanTempDir := filepath.Join(tempdir, "p")
118+
err = os.Mkdir(podmanTempDir, 0o700)
119+
Expect(err).ToNot(HaveOccurred())
120+
podmanTest = PodmanTestCreate(podmanTempDir)
118121
podmanTest.Setup()
119122
// see GetSafeIPAddress() below
120123
safeIPOctets[0] = uint8(GinkgoT().ParallelProcess()) + 128

test/e2e/run_transient_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var _ = Describe("Podman run with volumes", func() {
2222
containerStorageDir = filepath.Join(podmanTest.Root, podmanTest.ImageCacheFS+"-containers")
2323
dbDir = filepath.Join(podmanTest.Root, "libpod")
2424
runContainerStorageDir = filepath.Join(podmanTest.RunRoot, podmanTest.ImageCacheFS+"-containers")
25-
runDBDir = tempdir
25+
runDBDir = podmanTest.TempDir
2626
})
2727

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

0 commit comments

Comments
 (0)