Merge "Fix bifrost tests (Stein)" into stable/stein

This commit is contained in:
Zuul 2019-05-31 12:15:30 +00:00 committed by Gerrit Code Review
commit c13212e6eb

View File

@ -12,7 +12,7 @@ function test_bifrost {
# TODO(mgoddard): Use openstackclient when clouds.yaml works. See # TODO(mgoddard): Use openstackclient when clouds.yaml works. See
# https://bugs.launchpad.net/bifrost/+bug/1754070. # https://bugs.launchpad.net/bifrost/+bug/1754070.
attempts=0 attempts=0
while [[ $(sudo docker exec bifrost_deploy bash -c "source env-vars && ironic driver-list" | wc -l) -le 4 ]]; do while [[ $(sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal driver list -f value" | wc -l) -eq 0 ]]; do
attempts=$((attempts + 1)) attempts=$((attempts + 1))
if [[ $attempts -gt 6 ]]; then if [[ $attempts -gt 6 ]]; then
echo "Timed out waiting for ironic conductor to become active" echo "Timed out waiting for ironic conductor to become active"
@ -20,9 +20,9 @@ function test_bifrost {
fi fi
sleep 10 sleep 10
done done
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-list" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node list"
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-create --driver ipmi --name test-node" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node create --driver ipmi --name test-node"
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-delete test-node" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node delete test-node"
} }