Greetings!

Fix for ipatests/test_xmlrpc/test_dns_plugin.py 
(test_forwardzone_delegation_warnings.test)

You can't have a DNS zone with the authoritative nameserver that does not have 
a A or AAAA record in the local DNS. Since in some test environments primary 
hostname of the master is managed by an external DNS, this hostname can not be 
used as a NS-record for IPA-managed zones. Therefore another existing fqdn 
corresponding to the master's ip and managed by IPA DNS was used.


Best regards,
Ganna Kaihorodova
Associate Software Quality Engineer


From 23104798f8350966bec3637396a85b528a47a9f4 Mon Sep 17 00:00:00 2001
From: Ganna Kaihorodova <gkaih...@redhat.com>
Date: Mon, 18 Jul 2016 19:10:17 +0200
Subject: [PATCH 1/2] You can't have a dns zone with the authoritative
 nameserver that does not have a A or AAAA record in the local DNS. Since in
 some test environments primary hostname of the master is managed by an
 external DNS, this hostname can not be used as a ns-record for IPA-managed
 zones. Therefore another existing fqdn corresponding to the master's ip and
 managed by IPA DNS was used

---
 ipatests/test_xmlrpc/test_dns_plugin.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index f3484166dd3c5986978d89ca64589960b3d12338..038d17e9debc86a8e9afcadcea30e7cee29bbd05 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -1,6 +1,6 @@
 # Authors:
 #   Pavel Zuna <pz...@redhat.com>
-#
+#   Ganna Kaihorodova <gkaih...@redhat.com>
 # Copyright (C) 2010  Red Hat
 # see file 'COPYING' for use and warranty information
 #
@@ -39,6 +39,7 @@ else:
 _dns_zone_record = DNSName(u'@')
 
 # default value of idnssoamname is local DNS server
+self_server_ns_1 = normalize_zone("ipa-ca.%s" % api.env.domain)
 self_server_ns = normalize_zone(api.env.host)
 self_server_ns_dnsname = DNSName(self_server_ns)
 
@@ -5078,7 +5079,7 @@ class test_forwardzone_delegation_warnings(Declarative):
             desc='Delegate zone %r from zone %r using NS record' % (
                 zone1_sub_fw, zone1_sub),
             command=('dnsrecord_add', [zone1_sub, u'fw'],
-                     {'nsrecord': self_server_ns}),
+                     {'nsrecord': self_server_ns_1}),
             expected={
                 'value': DNSName(u'fw'),
                 'summary': None,
@@ -5086,7 +5087,7 @@ class test_forwardzone_delegation_warnings(Declarative):
                     'objectclass': objectclasses.dnsrecord,
                     'dn': DN(('idnsname', u'fw'), zone1_sub_dn),
                     'idnsname': [DNSName(u'fw')],
-                    'nsrecord': [self_server_ns],
+                    'nsrecord': [self_server_ns_1],
                 },
             },
         ),
@@ -5206,7 +5207,7 @@ class test_forwardzone_delegation_warnings(Declarative):
             desc='Delegate zone %r from zone %r using NS record' % (
                 zone1_sub2_fw, zone1_sub),
             command=('dnsrecord_add', [zone1_sub, u'fw.sub2'],
-                     {'nsrecord': self_server_ns}),
+                     {'nsrecord': self_server_ns_1}),
             expected={
                 'value': DNSName(u'fw.sub2'),
                 'summary': None,
@@ -5214,7 +5215,7 @@ class test_forwardzone_delegation_warnings(Declarative):
                     'objectclass': objectclasses.dnsrecord,
                     'dn': DN(('idnsname', u'fw.sub2'), zone1_sub_dn),
                     'idnsname': [DNSName(u'fw.sub2')],
-                    'nsrecord': [self_server_ns],
+                    'nsrecord': [self_server_ns_1],
                 },
             },
         ),
@@ -5291,7 +5292,7 @@ class test_forwardzone_delegation_warnings(Declarative):
             desc='Delegate zone %r from zone %r using NS record' % (
                 zone1_sub2_fw, zone1),
             command=('dnsrecord_add', [zone1, u'fw.sub2.sub'],
-                     {'nsrecord': self_server_ns}),
+                     {'nsrecord': self_server_ns_1}),
             expected={
                 'value': DNSName(u'fw.sub2.sub'),
                 'summary': None,
@@ -5299,7 +5300,7 @@ class test_forwardzone_delegation_warnings(Declarative):
                     'objectclass': objectclasses.dnsrecord,
                     'dn': DN(('idnsname', u'fw.sub2.sub'), zone1_dn),
                     'idnsname': [DNSName(u'fw.sub2.sub')],
-                    'nsrecord': [self_server_ns],
+                    'nsrecord': [self_server_ns_1],
                 },
             },
         ),
-- 
2.7.4

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to