Add SRV record target validator

Add missing SRV record target validator to filter out possible
user errors.

https://fedorahosted.org/freeipa/ticket/2308
This commit is contained in:
Martin Kosek
2012-02-03 14:25:53 +01:00
parent cb4b2e6fac
commit e1fecfaf6a
2 changed files with 16 additions and 0 deletions

View File

@@ -565,6 +565,15 @@ class test_dns(Declarative):
expected=errors.ValidationError(name='srvrecord', error=''),
),
dict(
desc='Try to add invalid SRV record via parts to zone %r using dnsrecord_add' % (dnszone1),
command=('dnsrecord_add', [dnszone1, u'_foo._tcp'], {'srv_part_priority': 0,
'srv_part_weight' : 0,
'srv_part_port' : 123,
'srv_part_target' : u'foo bar'}),
expected=errors.ValidationError(name='srv_part_target', error=''),
),
dict(
desc='Add SRV record to zone %r using dnsrecord_add' % (dnszone1),
command=('dnsrecord_add', [dnszone1, u'_foo._tcp'], {'srvrecord': u"0 100 1234 %s" % dnszone1_mname}),