31 Commits

Author SHA1 Message Date
Stefan Nica
c4e8897fda Update functional tests missing skip check
There are some test cases that still use the
test.HeatIntegrationTest base class instead of
the functional_base.FunctionalTestsBase base class.

The effect is that these tests will not check whether
they are skipped (e.g. by setting the
heat_plugin/skip_functional_tests oslo.config attr)
and in some cases end up being executed and reporting
false errors.

Change-Id: I074901f4d0c0c84fa09554e09095402fb9cf0b8e
Closes-Bug: #1699124
2017-06-28 07:46:57 +00: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
Thomas Herve
90fc4fe89e Remove unknown parameters in patched update
When updating a stack with the existing flag, we keep the parameters
from the old template to be used against the new version. Sometimes
parameters will get remove and won't make sense anymore, and keeping
them would break update with a 'Parameter was not defined' error. This
filters out such parameters so that the updates succeed.

Change-Id: I6f2aa77da28d271dd001a137bb574b5470292f15
Closes-Bug: #1558610
2016-03-17 16:26:40 +01:00
Jenkins
825ba55b90 Merge "Ignore errors on old properties during update" 2016-02-24 10:02:00 +00:00
Bo Wang
d91eea03ac Use yaml.safe_load() instead of yaml.load()
yaml.load() provides the ability to construct an arbitrary python object
that may be dangerous. yaml.safe_load() limits this ability to simple
python objects like integers or lists.

ref: https://en.wikipedia.org/wiki/YAML#Security

Change-Id: I9c28c25f4265fb691d39e72e20ef9c99f5538bf5
2016-02-16 21:37:27 +08:00
Thomas Herve
1cfde62b2f Ignore errors on old properties during update
When an update fails on a template resource, we still store the template
in the stack environment. Retrying the update will fail because of
missing parameters, but we can ignore those as they should be harmless
and only matter in this broken case.

Change-Id: I859ea72b1cc95162b6f498b6af65e4d9fdd9458f
Closes-Bug: #1543685
2016-02-10 20:51:40 -05:00
Kanagaraj Manickam
bbb770841a Split abandon into pre-abandon(export) and abandon
Splits the existing abandon action into two actions as
below:
1. export: User is recommended to run export successfully
   before doing the abandon action. It returns the stack
   data, which can be used for adopting stack.
2. abandon: Abandons the given stack

Partial-Bug: #1353670

Co-Authored-By: Jason Dunsmore <jasondunsmore@gmail.com>
Change-Id: I65264d91b1378df9cb3e492bc6ccaa778940dd6b
2015-11-20 09:17:41 -06: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
Jenkins
6d1273841a Merge "Test case for resource_facade" 2015-10-06 11:18:16 +00:00
Jenkins
cff9dda9c3 Merge "Validate TemplateResource schema when based on other templates" 2015-09-16 11:02:59 +00:00
Angus Salkeld
19b8bb1b4c Test case for resource_facade
Change-Id: I8190752a4f415cfc87bf0116b2f2c95905e2685b
Related-bug: #1491146
2015-09-03 02:03:30 +00: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
Angus Salkeld
b897e7786f Validate TemplateResource schema when based on other templates
Currently this is only done if you override a python resource
and not if you override a template resource.

Closes-bug: #1479565
Change-Id: I29f65d5058c8c2e8b04cb1fcbcb4956040ec908a
2015-08-05 13:30:26 +10:00
kairat_kushaev
e129fce770 Add test for template resource suspend/resume
Add functional test that executes the following scenario:
- suspend a stack with template resource
- resume a stack with template resource.

Change-Id: I7e1ff7785f48d861752d681d26866c985b8c8513
Closes-bug: #1479595
2015-08-04 12:22:50 +03:00
Angus Salkeld
4b3b4ce14b Scan for output errors in functional tests
In _stack_output() look for unexpected "output_error" messages.
Fix a missing output in the template resource tests.

Change-Id: I71d5d7e5800d7503d9e6015f637fe7fef5d867fe
2015-07-27 20:14:52 +10:00
Angus Salkeld
caa1bd8602 Produce more meaningful exception messages in nested stacks
This produces a nested exception like:
 'ValueError: resources.nested.resources.my_server: it is broken, sorry'

This re-uses the path mechanism that StackValidationFailed exception
uses.

Change-Id: Id5204c15ee96784e04522ab3c5a8e66900f9a1d3
Closes-bug: 1459837
2015-06-24 08:52:08 +10:00
Rabi Mishra
141597f032 Fix property validation for TemplateResource during update
This fix adds schema regeneration before props are validated
for TemplateResource during stack-update.

Change-Id: Ia79a25083489f48ed7332fbbd089a0090452cdc4
Closes-Bug: #1452983
Closes-Bug: #1453923
2015-05-15 07:36:11 +05:30
Angus Salkeld
8c37b56ace Assert that we can update TemplateResources with a new file path
Test for bug 1452534

Change-Id: Ife879543d7aa4be402e457f4a935272e9a2c4e0d
2015-05-08 11:02:38 +10:00
Sergey Kraynev
1fb557bf05 Remove redundant checks of stack status
The main methods create/update/delete in HeatIntegrationTest class
already contains _wait_for_stack_status, so we can remove duplicate
checks in tests.
Also was added paramter enable_cleanup for stack_create method, which
allows to disable CleanUp method in tests, where we delete stack
manually.

Change-Id: I41b546d648656676ec9bc3b38940eac68f9a848d
2015-04-20 10:23:25 -04:00
Angus Salkeld
edf86aeac2 Persist parent_resource_name and make sure it's available
We are persisting for a number of reasons:
- so we don't have to pass this through ever rpc call
- the API exposes parent_resource (currently always None as
  it is not persisted)

Closes-bug: #1438978
Change-Id: Id2db36c0234a085ec4f0ce2ab114ec483ea29d81
2015-04-10 14:15:38 +10:00
Steve Baker
c21bca268a Use oslo.log for heat_integrationtests
Later the integration jobs can be tuned to have their own
logging settings.

This change also raises _log_console_output to info, so it is displayed
by default.

Change-Id: Ifcaa6faf76c655e0c8cfd7d76775b80de70062c4
2015-03-17 17:36:56 +13:00
Angus Salkeld
3c9bdbeae6 Move nested stack delete test to functional
This tries to prove that if you manually delete a nested
stack, the parent stack is still deletable.

part of blueprint decouple-nested
Change-Id: I1d0bf7b5d982dc1f312fbe70cbb09a2e624e3371
2015-02-17 21:14:38 +10:00
Jenkins
e7e41ef232 Merge "Move assign_keypair method in base class" 2015-02-13 13:57:40 +00:00
Sergey Kraynev
17993724ed Move assign_keypair method in base class
Change-Id: I69b8db037991f88b38b293560532bf51c0a04378
2015-02-13 06:27:14 -05:00
Jenkins
aceae591a8 Merge "Skip Stack Adopt/Abandon integration tests when Stack Adopt is disabled" 2015-02-13 08:40:18 +00:00
Vikas Jain
74a3c98e7a fixed typo from dependant to dependent
Change-Id: I182668213215d1135cdf07f5910e3154ab75a2b2
2015-02-11 12:10:27 -08:00
Sirushti Murugesan
66c1447860 Skip Stack Adopt/Abandon integration tests when Stack Adopt is disabled
Closes-Bug: 1415838
Change-Id: I79a8dab72579e9fe1fccb2a67d12cc57d14640ae
2015-02-04 09:33:05 +00:00
Angus Salkeld
aafbf6025c Fix update on failed stack
In the case of a dependant resource failing, a nested stack will not get
created, so we need to at least create an empty nested stack to allow
the update to work.

Change-Id: I2e83546801bce0da566ec8ef1322e30d695ff02a
Closes-bug: 1411103
2015-02-03 15:31:47 +10:00
Angus Salkeld
98d888dc8c Convert parser tests that need nested stacks to unit tests
Part of blueprint decouple-nested
Change-Id: Id64d88104ac11601beac95cf5792f814cad388c8
2015-01-23 15:31:14 +10:00
Pavlo Shchelokovskyy
4279bd2923 Enable H305 and H307 style checks
Correct grouping and ordering of imports

Change-Id: I47ea0d53f80d7f0aeb01c1c6afd63713be87ddf4
2015-01-20 09:47:25 +02:00
Angus Salkeld
5cab70e5da Move template resource tests to functional
Note: this enables adopt and abandon in the gate
so we can test this feature.

Part of blueprint decouple-nested
Change-Id: Id1e63fc4b4e609f699d718b8569c25d246e83faa
2015-01-12 23:07:05 +10:00