From 9cb907848f1de44c4037da8980f848f1e2597141 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Tue, 7 Oct 2014 13:22:41 +1300 Subject: [PATCH] Configure flavor and image from env Create nova flavor and set environment variables to set default configuration values for running integration tests. Change-Id: I47d386159e2c5283459b7550886df25970707238 --- heat_integrationtests/common/config.py | 6 +++--- heat_integrationtests/post_test_hook.sh | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/heat_integrationtests/common/config.py b/heat_integrationtests/common/config.py index 57f478c89..71fabe13b 100644 --- a/heat_integrationtests/common/config.py +++ b/heat_integrationtests/common/config.py @@ -37,17 +37,17 @@ IntegrationTestGroup = [ default=os.environ.get('OS_REGION_NAME'), help="The region name to us"), cfg.StrOpt('instance_type', - default='m1.micro', + default=os.environ.get('HEAT_TEST_INSTANCE_TYPE'), help="Instance type for tests. Needs to be big enough for a " "full OS plus the test workload"), cfg.StrOpt('image_ref', - default='Fedora-x86_64-20-20140618-sda', + default=os.environ.get('HEAT_TEST_IMAGE_REF'), help="Name of image to use for tests which boot servers."), cfg.StrOpt('keypair_name', default=None, help="Name of existing keypair to launch servers with."), cfg.StrOpt('minimal_image_ref', - default='cirros-0.3.2-x86_64-uec', + default=os.environ.get('HEAT_TEST_MINIMAL_IMAGE_REF'), help="Name of minimal (e.g cirros) image to use when " "launching test instances."), cfg.StrOpt('auth_version', diff --git a/heat_integrationtests/post_test_hook.sh b/heat_integrationtests/post_test_hook.sh index 09016aaf3..92856e16d 100755 --- a/heat_integrationtests/post_test_hook.sh +++ b/heat_integrationtests/post_test_hook.sh @@ -14,6 +14,14 @@ # This script is executed inside post_test_hook function in devstack gate. +# Register the flavor for booting test servers +source /opt/stack/new/devstack/accrc/admin/admin +export HEAT_TEST_INSTANCE_TYPE=m1.heat_int +nova flavor-create $HEAT_TEST_INSTANCE_TYPE 452 512 0 1 + +export HEAT_TEST_IMAGE_REF=Fedora-x86_64-20-20140618-sda +export HEAT_TEST_MINIMAL_IMAGE_REF=cirros-0.3.2-x86_64-uec + source /opt/stack/new/devstack/accrc/demo/demo cd /opt/stack/new/heat sudo -E tox -eintegration