From 8bbf899ec0c1ce5a9a500d680dac2391b8149a96 Mon Sep 17 00:00:00 2001 From: Manjeet Singh Bhatia Date: Mon, 4 Mar 2019 11:59:57 -0800 Subject: [PATCH] add assert to ping test Change-Id: I24055036e6d45b5eff1cd127e2a2c78485287587 Closes-Bug: #1818233 --- neutron_tempest_plugin/scenario/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py index cc1ca4c2..ffb4dbd7 100644 --- a/neutron_tempest_plugin/scenario/base.py +++ b/neutron_tempest_plugin/scenario/base.py @@ -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,