CI: Wait for Zun to delete the test container
We fail randomly on check-failure.sh which checks for containers being down. Since we share Docker with Zun, the script sees Zun test container and may fail when it is stopped but not yet removed. Change-Id: If8b001f7507663e49e8e535f1889592e5f428ab5 Closes-bug: #1853452
This commit is contained in:
parent
2f75313063
commit
a3c8a84834
@ -30,6 +30,22 @@ function test_zun_logged {
|
|||||||
openstack appcontainer list
|
openstack appcontainer list
|
||||||
openstack appcontainer show test
|
openstack appcontainer show test
|
||||||
openstack appcontainer delete --force --stop 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"
|
echo "SUCCESS: Zun"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user