aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-06-09 11:26:22 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-06-09 11:30:10 +0200
commitb049ac7ad61134b4a405505db5e041fd6bdb8a5c (patch)
treede0aa6471346b8d55aeee293b5220d8b8696f205 /testcases
parent44a8c38dd0e2be4cb3996bba7f89d29a426a6694 (diff)
Fix vPing success criteria evaluation bugfix
Switching back to the odl approach. Need more discussions to see how to evaluate the result from testcases.yaml Change-Id: Iaa866db3010d35bd2cc427190dfe64db6b732a93 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/OpenStack/vPing/vPing_ssh.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/testcases/OpenStack/vPing/vPing_ssh.py b/testcases/OpenStack/vPing/vPing_ssh.py
index 2a417eb3c..3f90bc214 100644
--- a/testcases/OpenStack/vPing/vPing_ssh.py
+++ b/testcases/OpenStack/vPing/vPing_ssh.py
@@ -391,6 +391,7 @@ def main():
cmd = '~/ping.sh ' + test_ip
flag = False
+ status = "FAIL"
while True:
time.sleep(1)
@@ -400,7 +401,7 @@ def main():
for line in output:
if "vPing OK" in line:
logger.info("vPing detected!")
-
+ status = "PASS"
# we consider start time at VM1 booting
stop_time = time.time()
duration = round(stop_time - start_time, 1)
@@ -418,12 +419,8 @@ def main():
logger.debug("Pinging %s. Waiting for response..." % test_ip)
sec += 1
- test_status = "FAIL"
- test_criteria = functest_utils.get_criteria_by_test("vping_ssh")
-
- if eval(test_criteria):
+ if status == "PASS":
logger.info("vPing OK")
- test_status = "PASS"
else:
duration = 0
logger.error("vPing FAILED")
@@ -436,10 +433,10 @@ def main():
logger,
start_time,
stop_time,
- test_status,
+ status,
details={'timestart': start_time,
'duration': duration,
- 'status': test_status})
+ 'status': status})
except:
logger.error("Error pushing results into Database '%s'"
% sys.exc_info()[0])