summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-10-15 20:06:08 +0000
committerGerrit Code Review <review@openstack.org>2019-10-15 20:06:08 +0000
commited9edc6b36ebc8c1ddbfbd4a35ea5793910176db (patch)
treecaf946a27e5fdc3a8b09d0e915156943306ec80e
parent56e5188fca3ba994a142f035b997df1c698f5c0c (diff)
parentdd6560f9618662198e25b298804742177db70e13 (diff)
downloadpython-heatclient-stable/train.tar.gz
Merge "Ignore not found when delete in test" into stable/traintrain-eoltrain-em1.18.1stable/train
-rw-r--r--heatclient/tests/functional/osc/v1/base.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/heatclient/tests/functional/osc/v1/base.py b/heatclient/tests/functional/osc/v1/base.py
index c9a946e..591225a 100644
--- a/heatclient/tests/functional/osc/v1/base.py
+++ b/heatclient/tests/functional/osc/v1/base.py
@@ -15,6 +15,7 @@ import os
import six
from tempest.lib.cli import base
from tempest.lib.cli import output_parser
+from tempest.lib import exceptions as tempest_exc
class OpenStackClientTestBase(base.ClientTestBase):
@@ -81,7 +82,13 @@ class OpenStackClientTestBase(base.ClientTestBase):
if wait:
cmd += ' --wait'
if id in self.openstack('stack list --short'):
- self.openstack(cmd)
+ try:
+ self.openstack(cmd)
+ except tempest_exc.CommandFailed as e:
+ msg = "Stack not found: %s" % id
+ if msg in six.text_type(e.stdout):
+ return
+ raise
def _stack_suspend(self, id, wait=True):
cmd = 'stack suspend ' + id