summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipatests/test_integration/test_dns_locations.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/ipatests/test_integration/test_dns_locations.py b/ipatests/test_integration/test_dns_locations.py
index e37e1dde3..9bd075cfa 100644
--- a/ipatests/test_integration/test_dns_locations.py
+++ b/ipatests/test_integration/test_dns_locations.py
@@ -104,6 +104,31 @@ class TestDNSLocations(IntegrationTest):
for ip in (self.master.ip, self.replicas[0].ip, self.replicas[1].ip):
self._test_against_server(ip, domain, expected_servers)
+ def test_nsupdate_without_locations(self):
+ """Test nsupdate file generated by dns-update-system-records
+ Remove all records and the use nsupdate to restore state and test if
+ all record are there as expected"""
+ domain = DNSName(self.master.domain.name).make_absolute()
+ filepath = '/tmp/ipa.nsupdate'
+ self.master.run_command([
+ 'ipa', 'dns-update-system-records', '--dry-run', '--out', filepath
+ ])
+
+ # delete original records first
+ for rname, _port in IPA_DEFAULT_MASTER_SRV_REC:
+ self.master.run_command([
+ 'ipa', 'dnsrecord-del', str(domain), str(rname), '--del-all'
+ ])
+
+ # allow unauthenticates nsupdate (no need to testing authentication)
+ self.master.run_command([
+ 'ipa', 'dnszone-mod', str(domain),
+ '--update-policy=grant * wildcard *;'
+ ])
+ self.master.run_command(['nsupdate', '-g', filepath])
+ time.sleep(5) # give time to named to process everything from update
+ self.test_without_locations()
+
def test_one_replica_in_location(self):
"""Put one replica to location and test if records changed properly
"""