summaryrefslogtreecommitdiff
path: root/test/e2e/commit_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-18 20:52:44 +0200
committerGitHub <noreply@github.com>2020-08-18 20:52:44 +0200
commitff1f81b14a2944a1651e1b404681972ff3483d36 (patch)
tree05a830691cbea0575da682b1cbaf62c667572c04 /test/e2e/commit_test.go
parent7995f85f7559af9d69adaaa9061bd5c0c7f0d974 (diff)
parentbc07e1ba708f38b6ea21204b4b0ef9d777c0fcc5 (diff)
downloadpodman-ff1f81b14a2944a1651e1b404681972ff3483d36.tar.gz
podman-ff1f81b14a2944a1651e1b404681972ff3483d36.tar.bz2
podman-ff1f81b14a2944a1651e1b404681972ff3483d36.zip
Merge pull request #7341 from edsantiago/e2e_use_tmpdirs
e2e tests: use actual temp dirs, not "/tmp/dir"
Diffstat (limited to 'test/e2e/commit_test.go')
-rw-r--r--test/e2e/commit_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index c122ce50f..c1a213c00 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -257,8 +257,10 @@ var _ = Describe("Podman commit", func() {
cwd, err := os.Getwd()
Expect(err).To(BeNil())
Expect(os.Chdir(os.TempDir())).To(BeNil())
- targetPath := filepath.Join(os.TempDir(), "dir")
- Expect(os.MkdirAll(targetPath, 0755)).To(BeNil())
+ targetPath, err := CreateTempDirInTempDir()
+ if err != nil {
+ os.Exit(1)
+ }
targetFile := filepath.Join(targetPath, "idFile")
defer Expect(os.RemoveAll(targetFile)).To(BeNil())
defer Expect(os.Chdir(cwd)).To(BeNil())