aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-09-12 11:31:37 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-09-12 13:55:24 +0200
commit3f58e1ae6b78171215a506fc7cb5b0ced07e7054 (patch)
tree757ab70467fba2e49829e25373cbad6fa5b1e769
parente5ddac6afac2cea7c1ffd4fb4d6aab56f489ceab (diff)
Avoid running VNF testing if deployment failed
Change-Id: Id7642e47ec2cc438c5fe3a0ec9447f72b358adab Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 3afa7d700eebf2bfcaabab7bdd3aa09198ba4fe0)
-rw-r--r--functest_kubernetes/ims/ims.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/functest_kubernetes/ims/ims.py b/functest_kubernetes/ims/ims.py
index b3c0b844..fd796a57 100644
--- a/functest_kubernetes/ims/ims.py
+++ b/functest_kubernetes/ims/ims.py
@@ -110,7 +110,11 @@ class Vims(testcase.TestCase): # pylint: disable=too-many-instance-attributes
time.time()-self.start_time)
if not status:
watch_deployment.stop()
- self.result = 1/2 * 100
+ if not status:
+ self.result = 1/2 * 100
+ return True
+ self.__logger.error("Cannot deploy vIMS")
+ return False
def test_vnf(self):
"""Test vIMS as proposed by clearwater-live-test
@@ -167,8 +171,8 @@ class Vims(testcase.TestCase): # pylint: disable=too-many-instance-attributes
def run(self, **kwargs):
self.start_time = time.time()
try:
- self.deploy_vnf()
- self.test_vnf()
+ if self.deploy_vnf():
+ self.test_vnf()
except client.rest.ApiException:
self.__logger.exception("Cannot deploy and test vIms")
self.stop_time = time.time()