From 1cddd63976b8f266ab4d5088061b7b8cd0f3b412 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 23 Jan 2022 07:10:58 -0500 Subject: Show correct default values or show none Before this PR, the podman --help command shows the defaults as runc and overlay even if the storage.conf and containers.conf files do not match. This PR changes them to show the actual defaults and in the case of storage driver, does not show the default at all. Signed-off-by: Daniel J Walsh --- test/e2e/containers_conf_test.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/e2e/containers_conf_test.go') diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index 69eea580a..a23983623 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -304,9 +304,7 @@ var _ = Describe("Verify podman containers.conf usage", func() { }) It("podman-remote test localcontainers.conf", func() { - if !IsRemote() { - Skip("this test is only for remote") - } + SkipIfNotRemote("this test is only for remote") os.Setenv("CONTAINERS_CONF", "config/containers-remote.conf") // Configuration that comes from remote server @@ -560,4 +558,17 @@ var _ = Describe("Verify podman containers.conf usage", func() { inspect.WaitWithDefaultTimeout() Expect(inspect.OutputToString()).To(Equal("disabled")) }) + + It("podman containers.conf runtime", func() { + SkipIfRemote("--runtime option is not available for remote commands") + conffile := filepath.Join(podmanTest.TempDir, "container.conf") + err := ioutil.WriteFile(conffile, []byte("[engine]\nruntime=\"testruntime\"\n"), 0755) + Expect(err).ToNot(HaveOccurred()) + + os.Setenv("CONTAINERS_CONF", conffile) + result := podmanTest.Podman([]string{"--help"}) + result.WaitWithDefaultTimeout() + Expect(result).Should(Exit(0)) + Expect(result.OutputToString()).To(ContainSubstring("Path to the OCI-compatible binary used to run containers. (default \"testruntime\")")) + }) }) -- cgit v1.2.3-54-g00ecf