diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-08 18:21:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 18:21:34 +0200 |
commit | 64d1a357e8299c5fcecd4141091424419111cdee (patch) | |
tree | 14bc69d9b3c193f177fe919709aa73c811d1decf | |
parent | 83700a74f82f849146a890ca28a8968107e79910 (diff) | |
parent | 49406da9bd413e5868531b5afe0811fb3175f9a9 (diff) | |
download | podman-64d1a357e8299c5fcecd4141091424419111cdee.tar.gz podman-64d1a357e8299c5fcecd4141091424419111cdee.tar.bz2 podman-64d1a357e8299c5fcecd4141091424419111cdee.zip |
Merge pull request #3085 from cevich/snuffleupagus
Add simple test to confirm bad command-line arguments
-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))) + }) +}) |