From 49406da9bd413e5868531b5afe0811fb3175f9a9 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Wed, 8 May 2019 09:52:39 -0400 Subject: Add negative command-line test Signed-off-by: Chris Evich --- test/e2e/negative_test.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/e2e/negative_test.go (limited to 'test') diff --git a/test/e2e/negative_test.go b/test/e2e/negative_test.go new file mode 100644 index 000000000..3cb54a20a --- /dev/null +++ b/test/e2e/negative_test.go @@ -0,0 +1,38 @@ +package integration + +import ( + "os" + + . "github.com/containers/libpod/test/utils" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Podman negative command-line", func() { + var ( + tempdir string + err error + podmanTest *PodmanTestIntegration + ) + + BeforeEach(func() { + tempdir, err = CreateTempDirInTempDir() + if err != nil { + os.Exit(1) + } + podmanTest = PodmanTestCreate(tempdir) + }) + + AfterEach(func() { + podmanTest.Cleanup() + f := CurrentGinkgoTestDescription() + processTestResult(f) + + }) + + It("podman snuffleupagus exits non-zero", func() { + session := podmanTest.Podman([]string{"snuffleupagus"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + }) +}) -- cgit v1.2.3-54-g00ecf