mirror of
https://github.com/containers/podman.git
synced 2025-10-09 23:15:39 +08:00
kpod exec
Initial wiring of kpod exec. We wont support the following options for exec: * detach -- unsure of use case * detach-keys -- not supported by runc * interactive -- all terminals will be interactive Not adding exec tests as we need to think about how to support a test that requires console access but our CI tests have no console. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
30
test/kpod_exec.bats
Normal file
30
test/kpod_exec.bats
Normal file
@ -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 ]
|
||||
}
|
Reference in New Issue
Block a user