Merge "Fix error message when a stack is not deleted"

This commit is contained in:
Zuul 2023-05-19 14:17:59 +00:00 committed by Gerrit Code Review
commit 1ea31ce8f9
1 changed files with 5 additions and 2 deletions

View File

@ -415,14 +415,17 @@ class HeatStackFixture(tobiko.SharedFixture):
LOG.debug(f"Stack {self.stack_name} disappeared")
break
assert stack.stack_status == DELETE_COMPLETE
if attempt.is_last:
if stack.stack_status != DELETE_COMPLETE:
raise HeatStackDeletionFailed(
name=self.stack_name,
observed=stack.stack_status,
expected={DELETE_COMPLETE},
status_reason=stack.stack_status_reason)
if attempt.is_last:
tobiko.fail(f"Stack {self.stack_name} in status "
f"{DELETE_COMPLETE}, but still present")
cached = False
LOG.debug("Waiting for deleted stack to disappear: '%s'",
self.stack_name)