mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Tests: tests for NSEC3PARAM records
Ticket: https://fedorahosted.org/freeipa/ticket/4328 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
cbc64454b0
commit
4c88fdd904
@ -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(
|
dict(
|
||||||
desc='Create zone %r' % zone3,
|
desc='Create zone %r' % zone3,
|
||||||
command=(
|
command=(
|
||||||
|
Loading…
Reference in New Issue
Block a user