heat/heat_integrationtests
Zane Bitter aa58fbcacf Load existing resources using correct environment
In convergence we were loading resources from the database using the
current environment. This is incorrect when a previous update has
failed, meaning the resources in the database were created with a
non-current template and environment. If an attempt was made to change
the type of a resource but that resource was never updated, this will
result in us loading a resource with the wrong type. If the type has
been removed then it can result in errors just trying to show the stack.

Note that the Resource.load() method used during a convergence traversal
already does the Right Thing - it only uses the new type if it is a
valid substitution for the old type, and UpdateReplace is later raised
in Resource.update_convergence() if the type does not match in that
specified in the new environment. So we don't see any problems with
stack updates, just with API calls.

Since we cannot change the signature of Resource.__new__() without also
modifying the signature of __init__() in every resource plugin that has
implemented it (many of which are out of tree), instead substitute the
stack definition for the duration of creating the Resource object. This
will result in stack.env returning the environment the resource was last
updated with.

Change-Id: I3fbd14324fc4681b26747ee7505000b8fc9439f1
Story: #2005090
Task: 29688
2019-04-01 14:21:44 +05:30
..
common Use keystone session with heatclient in integration tests 2019-03-15 09:13:17 +00:00
functional Load existing resources using correct environment 2019-04-01 14:21:44 +05:30
locale Imported Translations from Zanata 2018-03-12 06:43:23 +00:00
README.rst Fix README.rst for in-tree functional tests 2018-02-05 16:34:50 +05:30
__init__.py Allow run tests for both tempest plugin and regression tests 2018-01-19 13:26:25 -05:00
cleanup_test_env.sh Bump minimal_image_ref 2018-12-19 15:39:36 +05:30
config-generator.conf Allow run tests for both tempest plugin and regression tests 2018-01-19 13:26:25 -05:00
post_test_hook.sh Bump minimal_image_ref 2018-12-19 15:39:36 +05:30
pre_test_hook.sh Use fedora 29 image from nodepool mirror 2018-11-28 13:05:31 +05:30
prepare_test_env.sh Support remote stack with another OpenStack provider 2019-03-13 22:15:45 +08:00
prepare_test_network.sh Bump minimal_image_ref 2018-12-19 15:39:36 +05:30

README.rst

Heat integration tests

These tests can be run against any heat-enabled OpenStack cloud, however defaults match running against a recent DevStack.

To run the tests against DevStack, do the following:

export DEST=/opt/stack

# create test resources and write config
$DEST/heat/heat_integrationtests/prepare_test_env.sh
$DEST/heat/heat_integrationtests/prepare_test_network.sh

# run the heat integration tests
cd $DEST/heat
stestr --test-path=heat_integrationtests run

If the Heat Tempest Plugin is also installed, the tests from that will be run as well.

If custom configuration is required, add it in the file heat_integrationtests/heat_integrationtests.conf. A sample configuration is available in heat_integrationtests/heat_integrationtests.conf.sample