Fix dns integration setup
Create TLDs for reverse lookups zones which are created by
neutron, Designate requires TLDs if it's exist any.
Related-PRODX: PRODX-29971
Change-Id: Ib8a29dc7c0db0afbd58b79919f2d8e8c7e2d3a1c
diff --git a/neutron_tempest_plugin/scenario/test_dns_integration.py b/neutron_tempest_plugin/scenario/test_dns_integration.py
index 623d676..48619d3 100644
--- a/neutron_tempest_plugin/scenario/test_dns_integration.py
+++ b/neutron_tempest_plugin/scenario/test_dns_integration.py
@@ -90,6 +90,13 @@
cls.tld_name = f".{tld_name}"
cls.class_tld = cls.admin_tld_client.create_tld(tld_name=tld_name[:-1])
+ # neutron creates zones for reverse lookups and designate requires
+ # related TLD if there is any
+ cls.tld_reverse_v4 = cls.admin_tld_client.create_tld(
+ tld_name="in-addr.arpa")
+ cls.tld_reverse_v6 = cls.admin_tld_client.create_tld(
+ tld_name="ip6.arpa")
+
zone_name = rand_zone_name(
name="dnsinttest", prefix='', suffix=cls.tld_name)
_, cls.zone = cls.dns_client.create_zone(name=zone_name)
@@ -107,6 +114,8 @@
@classmethod
def resource_cleanup(cls):
+ cls.admin_tld_client.delete_tld(cls.tld_reverse_v6[1]['id'])
+ cls.admin_tld_client.delete_tld(cls.tld_reverse_v4[1]['id'])
cls.admin_tld_client.delete_tld(cls.class_tld[1]['id'])
super(BaseDNSIntegrationTests, cls).resource_cleanup()