diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-13 11:58:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 11:58:26 +0200 |
commit | 53c39cf256a6e5c2c39bd3f243b737fe3e2837ad (patch) | |
tree | 6692cb707ffb73776165b744b04ba310c49d5a8a /test | |
parent | a1e83227d37bfade804b23b9446087a6c61ccc9f (diff) | |
parent | 2b03a1088a5ebd5bfd0ce30b972d0c2c9d4f3a7b (diff) | |
download | podman-53c39cf256a6e5c2c39bd3f243b737fe3e2837ad.tar.gz podman-53c39cf256a6e5c2c39bd3f243b737fe3e2837ad.tar.bz2 podman-53c39cf256a6e5c2c39bd3f243b737fe3e2837ad.zip |
Merge pull request #14205 from rhatdan/VENDOR
Vendor in latest containers/common
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/containers_conf_test.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index 854bf7420..819efa628 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -425,6 +425,7 @@ var _ = Describe("Verify podman containers.conf usage", func() { Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(Equal("/var/tmp")) + storagePath := filepath.Join(podmanTest.TempDir, "storage") configPath := filepath.Join(podmanTest.TempDir, "containers.conf") os.Setenv("CONTAINERS_CONF", configPath) @@ -441,7 +442,7 @@ var _ = Describe("Verify podman containers.conf usage", func() { Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(Equal("/foobar")) - containersConf = []byte("[engine]\nimage_copy_tmp_dir=\"storage\"") + containersConf = []byte(fmt.Sprintf("[engine]\nimage_copy_tmp_dir=%q", storagePath)) err = ioutil.WriteFile(configPath, containersConf, os.ModePerm) Expect(err).ToNot(HaveOccurred()) if IsRemote() { @@ -451,18 +452,18 @@ var _ = Describe("Verify podman containers.conf usage", func() { session = podmanTest.Podman([]string{"info", "--format", "{{.Store.ImageCopyTmpDir}}"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.Out.Contents()).To(ContainSubstring("containers/storage/tmp")) + Expect(session.Out.Contents()).To(ContainSubstring(storagePath)) containersConf = []byte("[engine]\nimage_copy_tmp_dir=\"storage1\"") err = ioutil.WriteFile(configPath, containersConf, os.ModePerm) Expect(err).ToNot(HaveOccurred()) - SkipIfRemote("Restarting the system service will fail loading the broken containers.conf") - - session = podmanTest.Podman([]string{"info", "--format", "{{.Store.ImageCopyTmpDir}}"}) - session.WaitWithDefaultTimeout() - Expect(session).Should(Exit(125)) - Expect(session.Err.Contents()).To(ContainSubstring("invalid image_copy_tmp_dir")) + if !IsRemote() { + session = podmanTest.Podman([]string{"info", "--format", "{{.Store.ImageCopyTmpDir}}"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(125)) + Expect(session.Err.Contents()).To(ContainSubstring("invalid image_copy_tmp_dir value \"storage1\" (relative paths are not accepted)")) + } }) // FIXME not sure why this is here |