File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,16 +74,23 @@ cleanup() {
7474}
7575trap cleanup EXIT
7676
77+ die () {
78+ echo $1
79+ exit 1
80+ }
81+
7782tar -xf rootfs.tar.gz -C ${TESTDIR}
7883cp runtimetest ${TESTDIR}
7984
8085oci-runtime-tool generate --output " ${TESTDIR} /config.json" " ${TEST_ARGS[@]} " --rootfs-path ' .'
8186
82- TESTCMD=" ${RUNTIME} start $( uuidgen) "
87+ CONID=$( uuidgen)
88+
89+ CREATECMD=" ${RUNTIME} create ${CONID} "
90+ TESTCMD=" ${RUNTIME} start ${CONID} "
91+ DELCMD=" ${RUNTIME} delete ${CONID} "
8392pushd $TESTDIR > /dev/null
84- if ! ${TESTCMD} ; then
85- error " Runtime ${RUNTIME} failed validation"
86- else
87- info " Runtime ${RUNTIME} passed validation"
88- fi
93+ ${CREATECMD} || die " failed to create ${CONID} "
94+ ${TESTCMD} || die " failed to start ${CONID} "
95+ sleep 1 && ${DELCMD} || die " failed to delete ${CONID} "
8996popd > /dev/null
You can’t perform that action at this time.
0 commit comments