17 Commits

Author SHA1 Message Date
Thomas Herve
448a6a7121 Fix race in new condition test
We're check the number of resources a bit early, let's wait a bit.

Change-Id: I40160240cbc2c515c84569637c8a3af671082c60
2017-07-05 15:45:39 +02:00
Thomas Herve
b6692d6152 Add functional test for conditions during updates
Change-Id: I64dab0e6ec6f5758ccba936b007f3453fb847f8f
Depends-On: I6d08507f43b0fcc4c0b5e848e97fa26033d839b2
Related-Bug: #1699463
2017-06-22 20:51:33 +00:00
Thomas Herve
45fde10197 Copy template version when update fails
When an update fails, we may have copy some chunk of resources or
parameters to the new template. If the version was updated and the new
resources require the version, this can lead to a state where the stack
is in an usable state. This synchronizes the version when a failure
happens.

Change-Id: I2faf8f3541fc800ea61c417e5575f4a56a83665b
Closes-Bug: #1620696
2017-04-20 20:56:22 +02:00
zhufl
bc3c16a8e5 Remove unnecessary setUp and tearDown
setUp and tearDown will be automatically called around each
testcase, so this is to remove setUp and tearDown that doing
nothing additional than super to keep code clean.

Change-Id: I8b6943602419d3f360991721d90b61888b55ea60
2016-09-30 10:56:31 +08:00
Rabi Mishra
9101cd4a54 Add wait_sec for test_stack_update_from_failed
Similar to some other failures where the updated_time does not
change, _verify_status ignores it and the test times out.

Change-Id: Ifdf8c1e5e129fdd6c3592ffaca307e43c1317f70
Related-Bug: #1583630
2016-06-15 08:58:41 +05:30
Jaime Guerrero
4c4301fbe0 Add wait_secs to test_stack_update_from_failed_patch
Add a 1 second pause to test_stack_update_from_failed_patch.  If a stack is
updated more than once per second, there is a possibility for busy waiting if
_verify_status neither returns nor raises an exception.

Please see
https://github.com/openstack/heat/blob/master/heat_integrationtests/common/test.py#L277
for _verify_status.

Closes bug: 1583630

Change-Id: Ifa9a5e9d69b47fe07fbc9ffcbe8f03479a24bb6c
2016-05-23 22:26:43 +00:00
Sergey Kraynev
a21607b2b5 Remove redundant _stack_rand_name from func tests
Base HeatIntegrationTest class uses _stack_rand_name method in
stack_create method, so redundant using of _stack_rand_name should be removed
in tests, where:
 1. stacks.create method is not called directly
 2. stacks_name is not used later in the test

Change-Id: Iabdd945604a8276b33930b264689c3a2edadecd8
2016-01-25 06:03:36 -05:00
Jenkins
835a819e36 Merge "Add a test for environment change in failed update" 2015-11-17 21:18:31 +00:00
Steven Hardy
98044dbd17 Allow in-place updates for all compatible types
We previously only allowed a resource to update in-place when the 'type'
field in the old and new templates matched. In an age of environment type
mappings, this is incorrect. Instead, allow a resource to be updated
in-place when the old and new resource plugins are of the same class, since
this is actually what determines whether handle_update is capable of
correctly updating the resource in-place.

There is a special-case for TemplateResource as we currently subclass it
for each template type, but all TemplateResource subclasses are in fact
capable of converting between each other via a stack update.

Change-Id: Iba4abf5efd9737ca6a17d8c91d5c54ab6d3f12e0
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1508115
2015-11-16 10:43:40 -05:00
Thomas Herve
13c6891070 Add a test for environment change in failed update
Add a functional test which verifies that adding a new resource during
an update, with a new custom resource type mapping in the environment,
allows for recovery when the update fails.

Change-Id: I7e52703b7f45c79a3a1434200d1e49988e78f333
Related-Bug: 1508096
2015-11-13 17:13:48 +01:00
Peter Razumovsky
ab40f01982 Fix [H405] pep rule in heat_integrationtests
Implements bp docstring-improvements

Change-Id: I7aebbdafef121c3414e6a0260452c1353af62e88
2015-10-08 15:13:52 +03:00
Steven Hardy
4f098762d6 Add functional test coverage for PATCH updates
Adds coverage for patch updates which didn't land previously with the
code.

Change-Id: I66b721d1af787e9d64b8b942818a6c8b4412fa7b
Related-Bug: #1224828
2015-10-02 10:42:09 +01:00
Sergey Kraynev
eed57a62c4 Add integration test for UPDATE_FAILED recovery
It's valid to attempt an update from UPDATE_FAILED state, so add
a functional test which proves this works.

This requires an adjustment to the common test.py _verify_status
because we now need to ensure we record the time of transition to
FAILED state as well as COMPLETE, or we'll mis-detect the failure
as a failure of the subsequent recovery update.

Co-Authored-By: Sergey Kraynev <skraynev@mirantis.com>
Change-Id: I5fc82b4c71a943ba15c04b08bcfd26fcb84dc7a4
2015-09-10 11:36:41 +01:00
Angus Salkeld
fe56541fd5 Make the TestResource a bit smarter
This is a better representation of how actual resources work.

1. implement check_*_complete
2. measure the time, not just do one sleep
3. add client_name and entity_name so we can actually talk to a service
   (even if it fails).
4. add some example usage in test_create_update.py
5. don't use json_snippet._properties

The timeout works in a similar way to the waitcondition.

Change-Id: I7d3fd0340fefe4a06b8d4f0952c162be604aa58c
2015-09-04 10:29:57 +10:00
Rabi Mishra
25becbcbf4 Add config entries to skip integration tests
This adds options to skip scenario and functional tests.
You can either skip the complete set of tests or list of specific
tests.

Following new config options are added:

`skip_scenario_tests` -  Skip all scenario tests
`skip_functional_tests` - Skip all functional tests
`skip_functional_test_list` - List of functional tests to skip
`skip_scenario_test_list` - List of scenario tests to skip
`skip_test_stack_action_list` - List of actions in tests to skip

Change-Id: I7a5233f5db1f065ccee5a97408c72203c108a656
Depends-On: I25c5e853f0499b88f2803b077d19e132140908f1
2015-08-07 07:29:20 +00:00
Rabi Mishra
3db5d3a8b7 Use network 'heat-net' for integration_tests
Neutron support for ipv6 is not complete yet (ex. LBaaS
only supports ipv4). We'had some gate issues after dual
stack was enabled in devstack. We had put some tactical
fixes to resolve those[1][2].

This fix adds usage of heat-net/heat-subnet(only ipv4)
for integration tests. This also rolls back the earlier
tactical changes.

https://review.openstack.org/#/c/178576
https://review.openstack.org/#/c/178933/

Change-Id: Ia863edb8932b8dea5c4fa110c97dcfdadca85bb9
2015-05-27 21:01:30 +05:30
Rakesh H S
5ea948ce9f test_resource for functional tests
Introduces new resource plugin to be able to test various
functional test cases which includes Rollback, Update In Place,
Concurrent Update and can be customised furthur based on the needs.

Co-Authored-by: Anant Patil <anant.patil@hp.com>

Change-Id: I3b8a1d2928553c87abaac81ee687e0faa85c9c5e
2015-04-08 11:09:46 +05:30