commit | f70acd1650568ba8f5c48491b99135fd4f5f605c | [log] [tgz] |
---|---|---|
author | Miguel Lavalle <mlavalle@redhat.com> | Sun Mar 20 18:20:54 2022 -0500 |
committer | Miguel Lavalle <mlavalle@redhat.com> | Sun Mar 20 18:20:54 2022 -0500 |
tree | 04e5eeace3e5555821a8678d0cda5e1be5d78d0a | |
parent | 6b5360ef1812a732ea4437625de8ab423c9cb009 [diff] |
Test dns_assignment with external dns integration After the ports dns_assignment attribute calculation was changed by [1] to implement [2], this patch updates the corresponding scenario test case to reflect the current functionality [1] https://review.opendev.org/c/openstack/neutron/+/731624/ [2] https://specs.openstack.org/openstack//neutron-specs/specs/victoria/port_dns_assignment.html Change-Id: If667550a8745ea224d2099d662dd901dc5368ae5 Closes-Bug: #1956632
diff --git a/neutron_tempest_plugin/scenario/test_dns_integration.py b/neutron_tempest_plugin/scenario/test_dns_integration.py index 240a5a8..6f2756c 100644 --- a/neutron_tempest_plugin/scenario/test_dns_integration.py +++ b/neutron_tempest_plugin/scenario/test_dns_integration.py
@@ -147,11 +147,16 @@ provider_segmentation_id=12345) cls.subnet2 = cls.create_subnet(cls.network2) + def _verify_dns_assignment(self, port): + expected_fqdn = '%s.%s' % (port['dns_name'], self.zone['name']) + self.assertEqual(expected_fqdn, port['dns_assignment'][0]['fqdn']) + @decorators.idempotent_id('fa6477ce-a12b-41da-b671-5a3bbdafab07') def test_port_on_special_network(self): name = data_utils.rand_name('port-test') port = self.create_port(self.network2, dns_name=name) + self._verify_dns_assignment(port) addr = port['fixed_ips'][0]['ip_address'] self._verify_dns_records(addr, name) self.client.delete_port(port['id'])