Fail the test run if image download fails
When we run the integration tests, we download the test image that we need and upload it on the fly. If the download is aborted because of some network problem, the image is incorrect, but we still try to run the tests and boot servers with it. We should fail early instead. Change-Id: I8797440086206749c9098dcd42b84d95426fbf3e Closes-Bug: #1534026
This commit is contained in:
parent
6f96e75bb4
commit
150a013597
@ -32,6 +32,12 @@ openstack flavor create m1.heat_micro --ram 128
|
||||
|
||||
# Register the glance image for testing
|
||||
curl http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2 | openstack image create fedora-heat-test-image --disk-format qcow2 --container-format bare --public
|
||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
||||
# The curl command failed, so the upload is mostly likely incorrect. Let's
|
||||
# bail out early.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
iniset heat_integrationtests.conf DEFAULT image_ref fedora-heat-test-image
|
||||
iniset heat_integrationtests.conf DEFAULT boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
|
||||
iniset heat_integrationtests.conf DEFAULT heat_config_notify_script $DEST/heat-templates/hot/software-config/elements/heat-config/bin/heat-config-notify
|
||||
|
Loading…
Reference in New Issue
Block a user