From f25a7c2e962e3165e54a01479067ca9a900db6a2 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Tue, 18 Jun 2019 15:47:32 +0200 Subject: [PATCH] XMLRPC tests: add new test for ipa dsnrecord-mod $ZONE $RECORD --ttl The test suite did not have any test for modification of the TTL of an existing DNS record. Related: https://pagure.io/freeipa/issue/7982 Reviewed-By: Rob Crittenden Reviewed-By: Christian Heimes Reviewed-By: Alexander Bokovoy --- ipatests/test_xmlrpc/test_dns_plugin.py | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py index 52ff7ab24..32c81f27d 100644 --- a/ipatests/test_xmlrpc/test_dns_plugin.py +++ b/ipatests/test_xmlrpc/test_dns_plugin.py @@ -1948,6 +1948,34 @@ class test_dns(Declarative): }, ), + dict( + desc='Modify ttl of record %r in zone %r' % (name1, zone1), + command=('dnsrecord_mod', [zone1, name1], {'dnsttl': 500}), + expected={ + 'value': name1_dnsname, + 'summary': None, + 'result': { + 'idnsname': [name1_dnsname], + 'dnsttl': ['500'], + 'arecord': [revname2_ip], + }, + }, + ), + + + dict( + desc='Delete ttl of record %r in zone %r' % (name1, zone1), + command=('dnsrecord_mod', [zone1, name1], {'dnsttl': None}), + expected={ + 'value': name1_dnsname, + 'summary': None, + 'result': { + 'idnsname': [name1_dnsname], + 'arecord': [revname2_ip], + }, + }, + ), + dict( desc='Try to add per-zone permission for unknown zone',