diff options
author | Martin Basti <mbasti@redhat.com> | 2014-06-06 16:21:51 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-20 15:41:40 +0200 |
commit | 4c88fdd9046c682c4b2cdce760e4c5440f2d41de (patch) | |
tree | 36dfabdd313d506bdc23c87eef979efd4add365c /ipatests | |
parent | cbc64454b026993d3724c9640e6ec738f549fdcd (diff) | |
download | freeipa-4c88fdd9046c682c4b2cdce760e4c5440f2d41de.tar.gz freeipa-4c88fdd9046c682c4b2cdce760e4c5440f2d41de.tar.xz freeipa-4c88fdd9046c682c4b2cdce760e4c5440f2d41de.zip |
Tests: tests for NSEC3PARAM records
Ticket: https://fedorahosted.org/freeipa/ticket/4328
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_xmlrpc/test_dns_plugin.py | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py index 3e7d40fcf..404bee204 100644 --- a/ipatests/test_xmlrpc/test_dns_plugin.py +++ b/ipatests/test_xmlrpc/test_dns_plugin.py @@ -1558,6 +1558,69 @@ class test_dns(Declarative): }, ), + + dict( + desc='Try to add NSEC3PARAM record out of zone record %r' % (zone1), + command=('dnsrecord_add', [zone1, u'test'], + {'nsec3paramrecord': u'1 0 2 ad50f1'}), + expected=errors.ValidationError(name='nsec3paramrecord', + error=u'must be in zone record'), + ), + + + dict( + desc='Try to add invalid NSEC3PARAM record to zone %r' % (zone1), + command=('dnsrecord_add', [zone1, u'@'], + {'nsec3paramrecord': u'1 0 2 -ad50f1'}), + expected=errors.ValidationError(name='salt', + error=u'only hexadecimal digits or single hyphen ("-") are allowed'), + ), + + + dict( + desc='Add NSEC3PARAM record to zone %r' % (zone1), + command=('dnsrecord_add', [zone1, u'@'], + {'nsec3paramrecord': u'1 0 2 ad50f1'}), + expected={ + 'value': _dns_zone_record, + 'summary': None, + 'result': { + 'dn': zone1_dn, + 'arecord': [u'172.16.29.111'], + 'idnsname': [_dns_zone_record], + 'nsrecord': [zone1_absolute], + 'nsec3paramrecord': [u'1 0 2 ad50f1'], + 'objectclass': objectclasses.dnszone, + }, + }, + ), + + + dict( + desc='Try to add another NSEC3PARAM record to zone %r' % (zone1), + command=('dnsrecord_add', [zone1, u'@'], + {'nsec3paramrecord': u'1 0 2 -'}), + expected=errors.ValidationError(name='nsec3paramrecord', + error=u'Only one NSEC3PARAM record is allowed per zone'), + ), + + + dict( + desc='Remove NSEC3PARAM record from zone %r' % (zone1), + command=('dnsrecord_del', [zone1, u'@'], + {'nsec3paramrecord': u'1 0 2 ad50f1'}), + expected={ + 'value': [_dns_zone_record], + 'summary': None, + 'result': { + 'arecord': [u'172.16.29.111'], + 'idnsname': [_dns_zone_record], + 'nsrecord': [zone1_absolute], + }, + }, + ), + + dict( desc='Create zone %r' % zone3, command=( |