heat/heat_integrationtests/functional
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
..
__init__.py Functional test UpdateStackTest 2014-10-20 16:31:09 +13:00
functional_base.py Add integration tests for admin actions 2016-06-14 22:39:33 +05:30
test_admin_actions.py Add integration tests for admin actions 2016-06-14 22:39:33 +05:30
test_autoscaling.py m1.tiny is not always there 2016-11-08 05:19:10 +00:00
test_aws_stack.py Skip integration tests when Swift is not available 2017-03-23 11:20:14 +01:00
test_cancel_update.py Don't use hardcoded flavors in tests 2016-12-06 12:14:18 +05:30
test_conditional_exposure.py Encode exception message in tests 2017-02-28 09:47:05 +01:00
test_conditions.py Fix races in conditionals tests 2018-02-07 20:22:24 -05:00
test_create_update.py Load existing resources using correct environment 2019-04-01 14:21:44 +05:30
test_default_parameters.py Remove unnecessary setUp and tearDown 2016-09-30 10:56:31 +08:00
test_delete.py Increase the timeout for the stop_stack message 2016-09-22 09:45:08 -04:00
test_env_merge.py Modify use of assertTrue(A in B) 2016-09-02 08:30:00 +00:00
test_heat_autoscaling.py Remove use of CooldownMixin with scaling policy 2018-01-28 09:41:20 +05:30
test_immutable_parameters.py Return HTTPBadRequest error from API for immutable parameters 2016-03-01 21:00:16 -06:00
test_instance_group.py m1.tiny is not always there 2016-11-08 05:19:10 +00:00
test_nested_get_attr.py Add a functional test for nested get_attr functions 2017-07-10 16:43:38 -04:00
test_notifications.py Fix calls to call_until_true 2017-04-10 17:00:57 +02:00
test_preview_update.py Fix update preview to handle nested stacks 2016-02-03 12:34:33 +00:00
test_purge.py Remove additional purge test 2016-08-03 10:31:09 +02:00
test_replace_deprecated.py Fix non-destructive upgrade for deprecated res types in convergence 2017-11-01 18:03:20 -04:00
test_resource_chain.py Use more specific asserts in tests 2016-11-22 08:12:35 +01:00
test_resource_group.py Keep old files in file map for rolling update 2018-05-11 12:02:01 +05:30
test_simultaneous_update.py Retrigger new traversals after resource timeout 2017-10-18 16:47:53 -04:00
test_snapshot_restore.py Fix handle_restore for server and volume resources 2017-05-19 11:56:27 +05:30
test_software_deployment_group.py Fix races in SoftwareDeploymentGroupTest 2017-06-14 16:31:54 -04:00
test_stack_cancel.py Add functional tests for stack cancel 2017-11-10 09:55:11 +05:30
test_swiftsignal_update.py Skip integration tests when Swift is not available 2017-03-23 11:20:14 +01:00
test_template_resource.py Improve error reporting for missing nested template 2018-06-18 18:39:45 +00:00
test_template_versions.py Add Rocky versions 2018-04-26 14:44:03 +08:00
test_translation.py Add few functional tests for translation 2017-04-12 12:02:48 +00:00
test_update_restricted.py Do deepcopy when copying templates 2018-04-24 16:47:11 +05:30
test_validation.py Add config entries to skip integration tests 2015-08-07 07:29:20 +00:00
test_versionnegotiation.py Add functional test for version negotiation 2018-06-14 08:18:28 +00:00