2017-09-13 19:06:54 +00:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load helpers
|
|
|
|
|
|
|
|
function teardown() {
|
|
|
|
cleanup_test
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "ctr termination reason Completed" {
|
|
|
|
start_crio
|
2017-11-15 15:24:20 +00:00
|
|
|
run crictl runs "$TESTDATA"/sandbox_config_selinux.json
|
2017-09-13 19:06:54 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
pod_id="$output"
|
2017-11-15 15:24:20 +00:00
|
|
|
run crictl create "$pod_id" "$TESTDATA"/container_redis.json "$TESTDATA"/sandbox_config_selinux.json
|
2017-09-13 19:06:54 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
ctr_id="$output"
|
2017-11-15 15:24:20 +00:00
|
|
|
run crictl start "$ctr_id"
|
2017-09-13 19:06:54 +00:00
|
|
|
echo "$output"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
|
|
|
cleanup_ctrs
|
|
|
|
cleanup_pods
|
|
|
|
stop_crio
|
|
|
|
}
|