Be specific about a FIP to be checked in CP tests

The configure step for the DRAgent tests configures a name for a
floating IP to be checked for at the peer side. Since the data plane
tests add one as well for an instance, make sure the control plane-only
tests rely on the FIP that has a specific name. This can be useful if
the tests are run in a different order.
This commit is contained in:
Dmitrii Shcherbakov
2023-06-17 14:59:03 +04:00
parent 8fae640826
commit e6d215119e
2 changed files with 5 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ from zaza.openstack.utilities import (
cli as cli_utils,
juju as juju_utils,
)
from zaza.openstack.configure.bgp_speaker import NDR_TEST_FIP
class DRAgentTest(neutron_tests.NeutronNetworkingBase):
@@ -83,7 +84,7 @@ class DRAgentTest(neutron_tests.NeutronNetworkingBase):
# Get expected advertised routes
private_cidr = self.project_subnet['cidr']
floating_ip_cidr = "{}/32".format(
self.neutron_client.list_floatingips()
self.neutron_client.list_floatingips(name=NDR_TEST_FIP)
["floatingips"][0]["floating_ip_address"])
# This test may run immediately after configuration.

View File

@@ -26,7 +26,7 @@ from zaza.openstack.utilities import (
)
FIP_TEST = "FIP TEST"
NDR_TEST_FIP = "NDR_TEST_FIP"
def setup_bgp_speaker(peer_application_name, keystone_session=None):
@@ -90,7 +90,8 @@ def setup_bgp_speaker(peer_application_name, keystone_session=None):
# Create Floating IP to advertise
logging.info("Creating floating IP to advertise")
port = openstack_utils.create_port(neutron_client,
FIP_TEST, openstack_utils.PRIVATE_NET)
NDR_TEST_FIP,
openstack_utils.PRIVATE_NET)
floating_ip = openstack_utils.create_floating_ip(neutron_client,
openstack_utils.EXT_NET,
port=port)