add assert to ping test

Change-Id: I24055036e6d45b5eff1cd127e2a2c78485287587
Closes-Bug: #1818233
This commit is contained in:
Manjeet Singh Bhatia 2019-03-04 11:59:57 -08:00
parent 3546226119
commit 8bbf899ec0
1 changed files with 5 additions and 0 deletions

View File

@ -340,6 +340,11 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
'reachable' if should_succeed else 'unreachable'
})
result = test_utils.call_until_true(ping, timeout, 1)
# To make sure ping_ip_address called by test works
# as expected.
self.assertTrue(result)
LOG.debug('%(caller)s finishes ping %(ip)s in %(timeout)s sec and the '
'ping result is %(result)s', {
'caller': caller, 'ip': ip_address, 'timeout': timeout,