Report duration and result when vping fails
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 3 Oct 2017 04:16:20 +0000 (06:16 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 3 Oct 2017 04:20:12 +0000 (06:20 +0200)
It completes "Bug fix: vping_userdata test status was not properly
reported" [1].

[1] https://gerrit.opnfv.org/gerrit/#/c/43911/

Change-Id: I7e8be6cd564a24ca174e63cfc295861c51cae8ed
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/vping/vping_base.py

index a8525a3..e719145 100644 (file)
@@ -181,10 +181,12 @@ class VPingBase(testcase.TestCase):
         else:
             raise Exception('VMs never became active')
 
+        self.stop_time = time.time()
+
         if result != testcase.TestCase.EX_OK:
+            self.result = 0
             return testcase.TestCase.EX_RUN_ERROR
 
-        self.stop_time = time.time()
         self.result = 100
         return testcase.TestCase.EX_OK