diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-12-11 10:41:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-11 10:41:58 -0600 |
commit | 0e328de08dc6e17b4cc45b1bf47f2deddb3fef6d (patch) | |
tree | 8b88407b645e9403f4fc7ebf2e4d62bc34785a20 /test/kpod_exec.bats | |
parent | 8d31ec2ad775c97c4b860eb24a3481092b6e88e3 (diff) | |
parent | e8a32e3722e0b814c654cdb8809565a21fc120d3 (diff) | |
download | podman-0e328de08dc6e17b4cc45b1bf47f2deddb3fef6d.tar.gz podman-0e328de08dc6e17b4cc45b1bf47f2deddb3fef6d.tar.bz2 podman-0e328de08dc6e17b4cc45b1bf47f2deddb3fef6d.zip |
Merge pull request #93 from baude/kpod_exec
kpod exec
Diffstat (limited to 'test/kpod_exec.bats')
-rw-r--r-- | test/kpod_exec.bats | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/kpod_exec.bats b/test/kpod_exec.bats new file mode 100644 index 000000000..d495b1687 --- /dev/null +++ b/test/kpod_exec.bats @@ -0,0 +1,30 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + copy_images +} + +@test "exec into a bogus container" { + run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar ls + echo "$output" + [ "$status" -eq 1 ] +} + +@test "exec without command should fail" { + run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar + echo "$output" + [ "$status" -eq 1 ] +} + +@test "exec simple command" { + ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t --name foobar1 ${ALPINE} sleep 60 + run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar1 ls + echo "$output" + [ "$status" -eq 0 ] +} |