Enhance scenario test to cover network dns_domain
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com> Depends-On: I6120d504959631f084d63458f6e9dada0dc5cbdf Depends-On: https://review.openstack.org/615556 Change-Id: Iaef52f9c43498c1748da14cd5ce72635bd31892d
This commit is contained in:
parent
cf38b77328
commit
d54ae6c936
@ -176,13 +176,13 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
|
||||
client.delete_interface(server_id, port_id=port_id)
|
||||
|
||||
def setup_network_and_server(
|
||||
self, router=None, server_name=None, **kwargs):
|
||||
self, router=None, server_name=None, network=None, **kwargs):
|
||||
"""Create network resources and a server.
|
||||
|
||||
Creating a network, subnet, router, keypair, security group
|
||||
and a server.
|
||||
"""
|
||||
self.network = self.create_network()
|
||||
self.network = network or self.create_network()
|
||||
LOG.debug("Created network %s", self.network['name'])
|
||||
self.subnet = self.create_subnet(self.network)
|
||||
LOG.debug("Created subnet %s", self.subnet['id'])
|
||||
|
@ -27,16 +27,17 @@ class InternalDNSTest(base.BaseTempestTestCase):
|
||||
|
||||
@utils.requires_ext(extension="dns-integration", service="network")
|
||||
@decorators.idempotent_id('988347de-07af-471a-abfa-65aea9f452a6')
|
||||
def test_dns_name(self):
|
||||
def test_dns_domain_and_name(self):
|
||||
"""Test the ability to ping a VM's hostname from another VM.
|
||||
|
||||
1) Create two VMs on the same network, giving each a name
|
||||
2) SSH in to the first VM:
|
||||
2.1) ping the other VM's internal IP
|
||||
2.2) ping the otheR VM's hostname
|
||||
2.2) ping the other VM's hostname
|
||||
"""
|
||||
|
||||
self.setup_network_and_server(server_name='luke')
|
||||
network = self.create_network(dns_domain='starwars.')
|
||||
self.setup_network_and_server(network=network, server_name='luke')
|
||||
self.create_pingable_secgroup_rule(
|
||||
secgroup_id=self.security_groups[-1]['id'])
|
||||
self.check_connectivity(self.fip['floating_ip_address'],
|
||||
@ -70,4 +71,8 @@ class InternalDNSTest(base.BaseTempestTestCase):
|
||||
self.check_remote_connectivity(
|
||||
ssh_client, leia_port['fixed_ips'][0]['ip_address'],
|
||||
timeout=CONF.validation.ping_timeout * 10)
|
||||
self.assertIn(
|
||||
'starwars', ssh_client.exec_command('cat /etc/resolv.conf'))
|
||||
|
||||
self.check_remote_connectivity(ssh_client, 'leia')
|
||||
self.check_remote_connectivity(ssh_client, 'leia.starwars')
|
||||
|
Loading…
Reference in New Issue
Block a user