Ensure lb is active before checking connectivity

This commit ensures the load-balancer is active before checking
connectivity to it for the scenario of test_pod_service_curl.

Change-Id: I935cc510d8d96ca031f30c4a3dbdfec6a6238e92
This commit is contained in:
Maysa Macedo 2022-01-07 12:36:44 +00:00
parent 804a54584e
commit 46ddd75cf7
1 changed files with 5 additions and 7 deletions

View File

@ -17,6 +17,7 @@ import time
import kubernetes
from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
@ -39,16 +40,13 @@ class TestServiceScenario(base.BaseKuryrScenarioTest):
@classmethod
def resource_setup(cls):
super(TestServiceScenario, cls).resource_setup()
cls.create_setup_for_service_test()
name = data_utils.rand_name(prefix='pod-service-curl')
cls.create_setup_for_service_test(service_name=name)
@decorators.idempotent_id('bddf5441-1244-449d-a125-b5fdcfa1a7a9')
def test_pod_service_curl(self):
pod_name, pod = self.create_pod()
self.addCleanup(self.delete_pod, pod_name)
self.assert_backend_amount_from_pod(
self.service_ip,
self.pod_num,
pod_name)
LOG.info("Trying to curl the service IP %s" % self.service_ip)
self.check_service_internal_connectivity()
class TestLoadBalancerServiceScenario(base.BaseKuryrScenarioTest):