Report duration and result when vping fails 11/44011/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 3 Oct 2017 04:16:20 +0000 (06:16 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Tue, 3 Oct 2017 06:36:28 +0000 (06:36 +0000)
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>
(cherry picked from commit 5ffb995c110be39364535f56c86c46d092b8cea0)

functest/opnfv_tests/openstack/vping/vping_base.py

index 8b622e1..1a23787 100644 (file)
@@ -165,10 +165,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