summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2014-07-01 13:39:57 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-07-02 14:54:42 +0200
commit01b95805ab1428e10c79abf70c9bc9e2baf9de21 (patch)
tree282561dac6115a26c81297ff0cf7a000931eb4a1 /ipatests
parent30551a8aa30dcd39b3ae4c2fe97a163620773730 (diff)
downloadfreeipa-01b95805ab1428e10c79abf70c9bc9e2baf9de21.tar.gz
freeipa-01b95805ab1428e10c79abf70c9bc9e2baf9de21.tar.xz
freeipa-01b95805ab1428e10c79abf70c9bc9e2baf9de21.zip
NSEC3PARAM tests
Ticket: https://fedorahosted.org/freeipa/ticket/4413 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_xmlrpc/test_dns_plugin.py105
1 files changed, 105 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index 995dd93a4..9937af9b6 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -448,6 +448,111 @@ class test_dns(Declarative):
},
),
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 0 0 0 X'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=(u'expected format: <0-255> <0-255> <0-65535> '
+ u'even-length_hexadecimal_digits_or_hyphen')
+ )
+ ),
+
+
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 0 0 X'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=(u'expected format: <0-255> <0-255> <0-65535> '
+ u'even-length_hexadecimal_digits_or_hyphen')
+ )
+ ),
+
+
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'333 0 0 -'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=u'algorithm value: allowed interval 0-255'
+ )
+ ),
+
+
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 333 0 -'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=u'flags value: allowed interval 0-255'
+ )
+ ),
+
+
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 0 65536 -'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=u'iterations value: allowed interval 0-65535'
+ )
+ ),
+
+
+ dict(
+ desc='Try to add invalid NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 0 0 A'}),
+ expected=errors.ValidationError(name="nsec3param_rec",
+ error=(u'expected format: <0-255> <0-255> <0-65535> '
+ u'even-length_hexadecimal_digits_or_hyphen')
+ )
+ ),
+
+
+ dict(
+ desc='Add NSEC3PARAM record to zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u'0 0 0 -'}),
+ expected={
+ 'value': zone1_absolute_dnsname,
+ 'summary': None,
+ 'result': {
+ 'idnsname': [zone1_absolute_dnsname],
+ 'idnszoneactive': [u'TRUE'],
+ 'nsrecord': [zone1_ns],
+ 'idnssoamname': [zone1_ns_dnsname],
+ 'idnssoarname': [zone1_rname_dnsname],
+ 'idnssoaserial': [fuzzy_digits],
+ 'idnssoarefresh': [u'5478'],
+ 'idnssoaretry': [fuzzy_digits],
+ 'idnssoaexpire': [fuzzy_digits],
+ 'idnssoaminimum': [fuzzy_digits],
+ 'idnsallowtransfer': [u'none;'],
+ 'idnsallowquery': [u'any;'],
+ 'nsec3paramrecord': [u'0 0 0 -'],
+ },
+ },
+ ),
+
+
+ dict(
+ desc='Delete NSEC3PARAM record from zone %s' % (zone1),
+ command=('dnszone_mod', [zone1], {'nsec3paramrecord': u''}),
+ expected={
+ 'value': zone1_absolute_dnsname,
+ 'summary': None,
+ 'result': {
+ 'idnsname': [zone1_absolute_dnsname],
+ 'idnszoneactive': [u'TRUE'],
+ 'nsrecord': [zone1_ns],
+ 'idnssoamname': [zone1_ns_dnsname],
+ 'idnssoarname': [zone1_rname_dnsname],
+ 'idnssoaserial': [fuzzy_digits],
+ 'idnssoarefresh': [u'5478'],
+ 'idnssoaretry': [fuzzy_digits],
+ 'idnssoaexpire': [fuzzy_digits],
+ 'idnssoaminimum': [fuzzy_digits],
+ 'idnsallowtransfer': [u'none;'],
+ 'idnsallowquery': [u'any;'],
+ },
+ },
+ ),
+
dict(
desc='Try to create reverse zone %r with NS record in it' % revzone1,