diff options
author | Martin Basti <mbasti@redhat.com> | 2017-01-30 21:18:46 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2017-02-15 12:20:55 +0100 |
commit | 5bd82174233095a3cccfbbf8524622440c31b10c (patch) | |
tree | c270b956fcd1eb23728696fe2f1abb8810d919d7 | |
parent | 7eb2ef61905a5c6ddf04237f0aa84e7585e1186d (diff) | |
download | freeipa-5bd82174233095a3cccfbbf8524622440c31b10c.tar.gz freeipa-5bd82174233095a3cccfbbf8524622440c31b10c.tar.xz freeipa-5bd82174233095a3cccfbbf8524622440c31b10c.zip |
Test: DNS nsupdate from dns-update-system-records
Get nsupdate data from dns-update-system-records, remove system records
and run nsupdate to verify that all system records were updated
https://fedorahosted.org/freeipa/ticket/6585
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r-- | ipatests/test_integration/test_dns_locations.py | 25 |
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 """ |