summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-08 18:21:34 +0200
committerGitHub <noreply@github.com>2019-05-08 18:21:34 +0200
commit64d1a357e8299c5fcecd4141091424419111cdee (patch)
tree14bc69d9b3c193f177fe919709aa73c811d1decf /test
parent83700a74f82f849146a890ca28a8968107e79910 (diff)
parent49406da9bd413e5868531b5afe0811fb3175f9a9 (diff)
downloadpodman-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
Diffstat (limited to 'test')
-rw-r--r--test/e2e/negative_test.go38
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)))
+ })
+})