2017-11-01 15:24:59 +00:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load helpers
|
|
|
|
|
|
|
|
function teardown() {
|
|
|
|
cleanup_test
|
|
|
|
}
|
|
|
|
|
2017-11-14 15:50:39 +00:00
|
|
|
function setup() {
|
|
|
|
copy_images
|
|
|
|
}
|
|
|
|
|
2017-11-01 15:24:59 +00:00
|
|
|
@test "kpod export output flag" {
|
2017-11-21 21:51:17 +00:00
|
|
|
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls"
|
2017-11-01 15:24:59 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
2017-11-21 21:51:17 +00:00
|
|
|
ctr_id="$output"
|
|
|
|
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar $ctr_id"
|
2017-11-01 15:24:59 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
2017-11-21 21:51:17 +00:00
|
|
|
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id"
|
2017-11-01 15:24:59 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
rm -f container.tar
|
|
|
|
}
|