From 27ccfef3a19a04b696cb90b8ba0d77e410f63fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 13 Jan 2025 22:07:07 +0100 Subject: [PATCH] Don't use all of tempdir as podman's --tmpdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... because (podman system reset) will delete all of it, interfering with the test storing other data in the directory. Signed-off-by: Miloslav Trmač --- test/e2e/common_test.go | 5 ++++- test/e2e/run_transient_test.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index af9d523be7..9417653839 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -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 diff --git a/test/e2e/run_transient_test.go b/test/e2e/run_transient_test.go index 46a9643e49..fa78907fa8 100644 --- a/test/e2e/run_transient_test.go +++ b/test/e2e/run_transient_test.go @@ -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() {