Refactor kpod tests

Move kpod tests from kpod.bats to kpod_[commandname].bats
Also make sure all status checks have a echo $output before them.

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Signed-off-by: umohnani8 <umohnani@redhat.com>
This commit is contained in:
Daniel J Walsh 2017-08-31 08:46:26 -04:00 committed by umohnani8
parent e838611fdd
commit e16bb3feb3
19 changed files with 350 additions and 295 deletions

View file

@ -7,9 +7,10 @@ function teardown() {
load helpers
IMAGE="redis:alpine"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
ROOT="${TESTDIR}/crio"
RUNROOT="${TESTDIR}/crio-run"
# Do not add --storage-driver vfs
KPOD_OPTIONS="--root ${ROOT} --runroot ${RUNROOT} --runtime ${RUNTIME_BINARY}"
@test "mount" {
start_crio
@ -42,7 +43,9 @@ KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
echo "$output"
[ "$status" -eq 0 ]
touch $root/foobar
${KPOD_BINARY} ${KPOD_OPTIONS} unmount $ctr_id
run ${KPOD_BINARY} ${KPOD_OPTIONS} unmount $ctr_id
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
cleanup_pods
stop_crio