Prevent false positives of *_FAILED status

Closes-Bug: #1446098

Change-Id: I9bf182a1c9d83df1b6fcffa5713eceb5118aba6b
This commit is contained in:
Sirushti Murugesan 2015-04-18 23:30:59 +05:30
parent e294154f17
commit c5794aa8d2
1 changed files with 7 additions and 2 deletions

View File

@ -234,7 +234,10 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
else:
if res.resource_status == status:
return
if fail_regexp.search(res.resource_status):
wait_for_action = status.split('_')[0]
resource_action = res.resource_status.split('_')[0]
if (resource_action == wait_for_action and
fail_regexp.search(res.resource_status)):
raise exceptions.StackResourceBuildErrorException(
resource_name=res.resource_name,
stack_identifier=stack_identifier,
@ -259,7 +262,9 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
else:
return True
if fail_regexp.search(stack.stack_status):
wait_for_action = status.split('_')[0]
if (stack.action == wait_for_action and
fail_regexp.search(stack.stack_status)):
# Handle UPDATE_FAILED case.
if status == 'UPDATE_FAILED':
if self.updated_time.get(