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 <rcritten@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud 2019-06-18 15:47:32 +02:00
parent bb91fcabee
commit f25a7c2e96

View File

@ -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',