Commit Graph

3 Commits (4a500125b350b46dee0d3c9f01c3cac7223d9c80)

Author SHA1 Message Date
Dmitriy Uvarenkov 13c338f266 Clean up tests setup
utils.setup_dummy_db() is called in parent class.
resources.initialise() seem to have no actual effect
in this tests.
self.ctx = utils.dummy_context() is often declared
but not used.

Change-Id: Iadcfd58b365ea8788f08a12ffaba612c6e5286cb
7 years ago
Rabi Mishra e2294da861 Fix action (CREATE) in progress error for TemplateResource/RG
When StackResource 'update_with_template' is called and there
is no existing nested_stack, we call create_stack with an empty
template(TemplateResource CREATE_FAILED->UPDATE flow). We check
db for CREATE_COMPLETE before calling update_stack.There is a
possibility that the create_stack green thread has not finished
and released the stack lock. By persisting the stack state for
COMPLETE/FAILED in the same db session as releasing the lock,
when green thread finishes it's run, we can avoid this race
condition.

Change-Id: I1442a7bcedb4fa340ee4f0e6ebc3705544c2a9dd
Closes-Bug: #1498495
8 years ago
tengqm e8a777fd1a Split engine service test cases (8)
This patch splits the stack watch related unit tests into a separate
module. Some mox calls are replaced with mock calls where approriate.

It also moves the existing modules related to engine service tests
into a separate subdirectory. This is to make room for other unit
tests that are coming in.

Change-Id: I7ea61c22e017785c480d78d6c07132164ed0b889
8 years ago