Merge "CI: Wait for Zun to delete the test container"

This commit is contained in:
Zuul 2019-11-24 16:47:41 +00:00 committed by Gerrit Code Review
commit 6fc3d762d6
1 changed files with 16 additions and 0 deletions

View File

@ -30,6 +30,22 @@ function test_zun_logged {
openstack appcontainer list
openstack appcontainer show test
openstack appcontainer delete --force --stop test
# NOTE(yoctozepto): We have to wait for the container to be deleted due to
# check-failure.sh checking stopped containers and failing.
# It is also nice to test that deleting actually works.
attempt=1
while openstack appcontainer show test; do
echo "Container not deleted yet"
attempt=$((attempt+1))
if [[ $attempt -eq 10 ]]; then
echo "Zun failed to delete the container"
openstack appcontainer show test
return 1
fi
sleep 10
done
echo "SUCCESS: Zun"
}