Files
podman/test/kpod_history.bats
baude 3db735c6d1 Short options!
Any subcommand that has two or more booleon short options can
now combine those two options.  For example:

kpod rmi -af (Remove all images forceably)

Signed-off-by: baude <bbaude@redhat.com>

Closes: #100
Approved by: rhatdan
2017-12-04 20:03:16 +00:00

54 lines
1.1 KiB
Bash

#!/usr/bin/env bats
load helpers
function teardown() {
cleanup_test
}
function setup() {
copy_images
}
@test "kpod history default" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history with Go template format" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history --format "{{.ID}} {{.Created}}" $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history human flag" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history --human=false $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history quiet flag" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history -q $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history no-trunc flag" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history --no-trunc $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history json flag" {
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} history --format json $ALPINE | python -m json.tool"
echo "$output"
[ "$status" -eq 0 ]
}
@test "kpod history short options" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} history -qH $ALPINE
echo "$output"
[ "$status" -eq 0 ]
}