From 6065070baed175853301a6396697f2fd6fbc511e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 26 Jul 2019 10:44:03 +0200 Subject: fix `podman -v` regression Re-add the shortflag for --version and add e2e tests to avoid regressing in the future. Signed-off-by: Valentin Rothberg --- test/e2e/version_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test') diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index 2c8b3068c..0db2e2cf2 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -4,6 +4,7 @@ import ( "os" . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/version" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -37,6 +38,26 @@ var _ = Describe("Podman version", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2)) + ok, _ := session.GrepString(version.Version) + Expect(ok).To(BeTrue()) + }) + + It("podman -v", func() { + SkipIfRemote() + session := podmanTest.Podman([]string{"-v"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + ok, _ := session.GrepString(version.Version) + Expect(ok).To(BeTrue()) + }) + + It("podman --version", func() { + SkipIfRemote() + session := podmanTest.Podman([]string{"--version"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + ok, _ := session.GrepString(version.Version) + Expect(ok).To(BeTrue()) }) It("podman version --format json", func() { -- cgit v1.2.3-54-g00ecf