Use assertTrue in checking pod connectivity

Replace a usage of CommandFailed exception

Change-Id: Idbca336f6b7d40abcf37d174cf44d9694c22316a
This commit is contained in:
Itzik Brown 2019-01-07 09:48:42 +02:00
parent 7f84979019
commit bab0b8582d
1 changed files with 4 additions and 3 deletions

View File

@ -66,9 +66,10 @@ class TestKuryrRestartScenario(base.BaseKuryrScenarioTest):
pod_name, pod = self.create_pod()
self.addCleanup(self.delete_pod, pod_name)
pod_fip = self.assign_fip_to_pod(pod_name)
if not self.ping_ip_address(
pod_fip['floatingip']['floating_ip_address']):
raise lib_exc.CommandFailed()
self.assertIsNotNone(pod_fip['floatingip'][
'floating_ip_address'])
self.assertTrue(self.ping_ip_address(pod_fip[
'floatingip']['floating_ip_address']))
# Check that both kuryr-pods are up and running
# The newly created pods are running because create_pod is written