diff options
author | baude <bbaude@redhat.com> | 2017-12-01 11:26:30 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-04 17:00:48 +0000 |
commit | 5c9694a0c1fc1d717c61597f659590dcb7b6f25b (patch) | |
tree | 4c2ff5ee08fbcd7d26faa2fc1e8ff736122a94e1 /test | |
parent | adf8809521733283c364ec7de27c783e324185e8 (diff) | |
download | podman-5c9694a0c1fc1d717c61597f659590dcb7b6f25b.tar.gz podman-5c9694a0c1fc1d717c61597f659590dcb7b6f25b.tar.bz2 podman-5c9694a0c1fc1d717c61597f659590dcb7b6f25b.zip |
kpod attach
Attach to a running container
Signed-off-by: baude <bbaude@redhat.com>
Closes: #95
Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r-- | test/kpod_attach.bats | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/kpod_attach.bats b/test/kpod_attach.bats new file mode 100644 index 000000000..968795935 --- /dev/null +++ b/test/kpod_attach.bats @@ -0,0 +1,32 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + copy_images +} + +@test "attach to a bogus container" { + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "attach to non-running container" { + ${KPOD_BINARY} ${KPOD_OPTIONS} create --name foobar -d -i ${ALPINE} ls + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "attach to multiple containers" { + ${KPOD_BINARY} ${KPOD_OPTIONS} run --name foobar1 -d -i ${ALPINE} /bin/sh + ${KPOD_BINARY} ${KPOD_OPTIONS} run --name foobar2 -d -i ${ALPINE} /bin/sh + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar1 foobar2" + echo "$output" + [ "$status" -eq 1 ] +} |