heat/heat_integrationtests
Zane Bitter 3fb8722012 Don't load new copies of current resources
The Stack._find_filtered_resources() method returns Resource objects for
all resources associated with the Stack, regardless of whether they are
current (present in the template; latest version in the case of
convergence). To do this, it previously created a new Resource object
for every resource found in the database.

However, for those resources which *are* current this is unnecessary. We
can access the Resource object simply through self.resources. It turns
out this is necessary for obtaining the required_by list for legacy
stacks, because only the Resources obtained from self.resources also
appear in the Dependencies graph obtained from self.dependencies. The
required_by list is read when listing or showing resources, which would
either return an empty list or fail for legacy stacks.

This patch also makes the Resource.required_by() method more robust in
its error handling.

Change-Id: Id438336e5c88dc7c2d168ba01ee703faa17e8b8e
Closes-Bug: #1703703
Related-Bug: #1523748
(cherry picked from commit 5ce238fb17
                       and 65630d4e8b)
2017-07-19 21:22:29 -04:00
..
api Merge "Add gabbi tests for resource REST API" 2017-01-24 06:56:33 +00:00
common Fix handle_restore for server and volume resources 2017-05-25 17:16:12 +05:30
functional Don't load new copies of current resources 2017-07-19 21:22:29 -04:00
scenario Merge "Do not set the mime-type for userdata" 2016-12-15 03:10:04 +00:00
.gitignore Support classes for heat integration tests 2014-09-24 09:02:20 +12:00
README.rst Run heat_integrationtests as a tempest plugin 2016-08-13 09:53:07 +12:00
__init__.py Support classes for heat integration tests 2014-09-24 09:02:20 +12:00
cleanup_test_env.sh Cleanup test env after tests 2016-12-13 05:45:34 +00:00
install-requirements Create integration tests requirements on the fly 2016-03-25 13:40:50 +00:00
plugin.py Run heat_integrationtests as a tempest plugin 2016-08-13 09:53:07 +12:00
post_test_hook.sh Cleanup test env after tests 2016-12-13 05:45:34 +00:00
pre_test_hook.sh Sleep between check_resource calls 2017-03-14 08:23:11 +00:00
prepare_test_env.sh Skip test_server_signal_userdata_format_software_config 2016-12-22 11:44:41 +05:30
prepare_test_network.sh Use osc commands for creating neutron resources 2016-10-20 15:42:40 +05:30

README.rst

Heat integration tests

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

To run the tests against DevStack, do the following:

# Define DEST

export DEST=/opt/stack

# create test resources and write tempest config

$DEST/heat/heat_integrationtests/prepare_test_env.sh $DEST/heat/heat_integrationtests/prepare_test_network.sh

# run tempest selecting only these tests

cd $DEST/tempest tempest run --regex heat_integrationtests

If custom configuration is required, edit the [heat_plugin] section of

$DEST/tempest/etc/tempest.conf