summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2014-06-06 16:21:51 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-20 15:41:40 +0200
commit4c88fdd9046c682c4b2cdce760e4c5440f2d41de (patch)
tree36dfabdd313d506bdc23c87eef979efd4add365c /ipatests
parentcbc64454b026993d3724c9640e6ec738f549fdcd (diff)
downloadfreeipa-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.py63
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=(