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č <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2025-01-13 22:07:07 +01:00
parent 2d42b13d55
commit 27ccfef3a1
2 changed files with 5 additions and 2 deletions

View File

@ -114,7 +114,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

View File

@ -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() {