From 02a085b60af15727d1b17a11acd300ad1775359b Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 11 Mar 2015 13:47:08 +1300 Subject: [PATCH] Func tests use fedora-heat-test-image This runs the existing functional tests using the images built in http://tarballs.openstack.org/heat-test-image/ This image should be a suitable alternative to Fedora-x86_64-20-20140618-sda, with the extra benefit that it is prepared to install the heat config agent projects during boot so that test_server_software_config can be enabled. This will also allow devstack to no longer load Fedora-x86_64-20-20140618-sda onto the nodepool images which will reduce gate resource consumption. Change-Id: I6041b8d6e7e9422f6e220d7aef0ca38857085e4b --- heat_integrationtests/common/config.py | 4 ++-- heat_integrationtests/prepare_test_env.sh | 5 ++++- .../scenario/test_server_software_config.py | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/heat_integrationtests/common/config.py b/heat_integrationtests/common/config.py index 7fc6a40730..f07ee86203 100644 --- a/heat_integrationtests/common/config.py +++ b/heat_integrationtests/common/config.py @@ -66,8 +66,8 @@ IntegrationTestGroup = [ default='private', help="Visible fixed network name "), cfg.StrOpt('boot_config_env', - default='heat_integrationtests/scenario/templates' - '/boot_config_none_env.yaml', + default=('heat_integrationtests/scenario/templates' + '/boot_config_none_env.yaml'), help="Path to environment file which defines the " "resource type Heat::InstallConfigAgent. Needs to " "be appropriate for the image_ref."), diff --git a/heat_integrationtests/prepare_test_env.sh b/heat_integrationtests/prepare_test_env.sh index 2a9de6b57c..537694a785 100755 --- a/heat_integrationtests/prepare_test_env.sh +++ b/heat_integrationtests/prepare_test_env.sh @@ -28,7 +28,10 @@ cd $DEST/heat/heat_integrationtests iniset heat_integrationtests.conf DEFAULT instance_type m1.heat_int nova flavor-create m1.heat_int 452 512 0 1 -iniset heat_integrationtests.conf DEFAULT image_ref Fedora-x86_64-20-20140618-sda +# Register the glance image for testing +glance image-create --name fedora-heat-test-image --disk-format qcow2 --container-format bare --is-public True --location http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2 +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 minimal_image_ref cirros-0.3.2-x86_64-uec cat heat_integrationtests.conf \ No newline at end of file diff --git a/heat_integrationtests/scenario/test_server_software_config.py b/heat_integrationtests/scenario/test_server_software_config.py index 2df815bc56..8b614c1d88 100644 --- a/heat_integrationtests/scenario/test_server_software_config.py +++ b/heat_integrationtests/scenario/test_server_software_config.py @@ -77,8 +77,12 @@ class SoftwareConfigIntegrationTest(scenario_base.ScenarioTestsBase): sid, res, 'CREATE_COMPLETE') except (exceptions.StackResourceBuildErrorException, exceptions.TimeoutException) as e: - self._log_console_output(servers=[server]) raise e + finally: + # attempt to log the server console regardless of deployments + # going to complete. This allows successful and failed boot + # logs to be compared + self._log_console_output(servers=[server]) # Check that stack was fully created self._wait_for_stack_status(sid, 'CREATE_COMPLETE')