Check connectivity to an existing pod in test_ha

Check connectivity to an existing pod after changing the number of
controllers in test_scale_down_controller and  test_scale_up_controller
tests

Change-Id: Ib4ba76104bcca882ca3734aa2af11d5cdc6d6b96
This commit is contained in:
Itzik Brown 2019-08-06 14:03:00 +03:00
parent 2bd54511a0
commit 9450ef731a
2 changed files with 11 additions and 2 deletions

View File

@ -880,6 +880,7 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest):
ip = self.get_pod_ip(name)
self.assertIsNotNone(ip)
self.assertTrue(self.ping_ip_address(ip))
return pod
def update_config_map_ini_section(
self, name, conf_to_update, section,

View File

@ -89,7 +89,7 @@ class TestHighAvailabilityScenario(base.BaseKuryrScenarioTest):
self.scale_controller_deployment(1)
# Create a pod and check connectivity
self.create_and_ping_pod()
pod = self.create_and_ping_pod()
# Get current leader annotation
annotation = self.get_kuryr_leader_annotation()
@ -106,6 +106,10 @@ class TestHighAvailabilityScenario(base.BaseKuryrScenarioTest):
# Create another pod and check connectivity
self.create_and_ping_pod()
# Check connectivity to an existing pod
self.assertTrue(self.ping_ip_address(self.get_pod_ip(
pod.metadata.name)))
@decorators.idempotent_id('afe75fa5-e9ca-4f7d-bc16-8f1dd7884eea')
def test_scale_down_controller(self):
controller_deployment = (
@ -121,7 +125,7 @@ class TestHighAvailabilityScenario(base.BaseKuryrScenarioTest):
self.scale_controller_deployment(2)
# Create a pod and check connectivity
self.create_and_ping_pod()
pod = self.create_and_ping_pod()
# Scale the controller down and wait until it stops
self.scale_controller_deployment(1)
@ -129,6 +133,10 @@ class TestHighAvailabilityScenario(base.BaseKuryrScenarioTest):
# Create another pod and check connectivity
self.create_and_ping_pod()
# Check connectivity to an existing pod
self.assertTrue(self.ping_ip_address(self.get_pod_ip(
pod.metadata.name)))
@decorators.idempotent_id('3b218c11-c77b-40a8-ba09-5dd5ae0f8ae3')
def test_auto_fencing(self):
controller_deployment = (