Merge pull request #3085 from cevich/snuffleupagus

Add simple test to confirm bad command-line arguments
This commit is contained in:
OpenShift Merge Robot 2019-05-08 18:21:34 +02:00 committed by GitHub
commit 64d1a357e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 0 deletions

38
test/e2e/negative_test.go Normal file
View File

@ -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)))
})
})