diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh index 233313e829..b559965fc9 100755 --- a/exercises/floating_ips.sh +++ b/exercises/floating_ips.sh @@ -195,8 +195,11 @@ nova floating-ip-delete $TEST_FLOATING_IP # shutdown the server nova delete $VM_UUID +# make sure the VM shuts down within a reasonable time +if ! timeout $TERMINATE_TIMEOUT sh -c "while nova show $VM_UUID | grep status | grep -q ACTIVE; do sleep 1; done"; then + echo "server didn't shut down!" + exit 1 +fi + # Delete a secgroup nova secgroup-delete $SECGROUP - -# FIXME: validate shutdown within 5 seconds -# (nova show $NAME returns 1 or status != ACTIVE)?