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
This commit is contained in:
Steve Baker 2014-10-07 13:22:41 +13:00
parent 045c8b4687
commit 9cb907848f
2 changed files with 11 additions and 3 deletions

View File

@ -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',

View File

@ -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