2016-09-27 07:14:31 +00:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load helpers
|
|
|
|
|
|
|
|
function teardown() {
|
|
|
|
cleanup_test
|
|
|
|
}
|
|
|
|
|
|
|
|
# PR#59
|
|
|
|
@test "pod release name on remove" {
|
2016-09-27 08:40:33 +00:00
|
|
|
if "$TRAVIS"; then
|
|
|
|
skip "cannot yet run this test in a container"
|
|
|
|
fi
|
2016-09-27 07:14:31 +00:00
|
|
|
|
|
|
|
start_ocid
|
|
|
|
run ocic pod create --config "$TESTDATA"/sandbox_config.json
|
|
|
|
[ "$status" -eq 0 ]
|
2016-09-27 08:40:33 +00:00
|
|
|
echo "$output"
|
2016-09-27 07:14:31 +00:00
|
|
|
id="$output"
|
|
|
|
run ocic pod stop --id "$id"
|
|
|
|
[ "$status" -eq 0 ]
|
2016-09-27 08:46:17 +00:00
|
|
|
sleep 1 # FIXME: there's a race between container kill and delete below
|
2016-09-27 07:14:31 +00:00
|
|
|
run ocic pod remove --id "$id"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
run ocic pod create --config "$TESTDATA"/sandbox_config.json
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
}
|