Fix the test by removing sleep and ensuring cleanup

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-09-27 11:36:17 -07:00
parent 89c051f81f
commit fd91998ef3

View file

@ -20,11 +20,16 @@ function teardown() {
id="$output"
run ocic pod stop --id "$id"
[ "$status" -eq 0 ]
sleep 1 # FIXME: there's a race between container kill and delete below
run ocic pod remove --id "$id"
[ "$status" -eq 0 ]
run ocic pod create --config "$TESTDATA"/sandbox_config.json
[ "$status" -eq 0 ]
echo "$output"
id="$output"
run ocic pod stop --id "$id"
[ "$status" -eq 0 ]
run ocic pod remove --id "$id"
[ "$status" -eq 0 ]
stop_ocid
cleanup_pods
}