diff options
author | Chris Evich <cevich@redhat.com> | 2019-05-08 09:52:39 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-05-08 11:04:37 -0400 |
commit | 49406da9bd413e5868531b5afe0811fb3175f9a9 (patch) | |
tree | 14bc69d9b3c193f177fe919709aa73c811d1decf /test | |
parent | 83700a74f82f849146a890ca28a8968107e79910 (diff) | |
download | podman-49406da9bd413e5868531b5afe0811fb3175f9a9.tar.gz podman-49406da9bd413e5868531b5afe0811fb3175f9a9.tar.bz2 podman-49406da9bd413e5868531b5afe0811fb3175f9a9.zip |
Add negative command-line test
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/negative_test.go | 38 |
1 files changed, 38 insertions, 0 deletions
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))) + }) +}) |