From e1fecfaf6a9f35d23105661292dea7d68b1cc19c Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Fri, 3 Feb 2012 14:25:53 +0100 Subject: Add SRV record target validator Add missing SRV record target validator to filter out possible user errors. https://fedorahosted.org/freeipa/ticket/2308 --- tests/test_xmlrpc/test_dns_plugin.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_xmlrpc/test_dns_plugin.py') diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py index b177b9d01..9d83d924e 100644 --- a/tests/test_xmlrpc/test_dns_plugin.py +++ b/tests/test_xmlrpc/test_dns_plugin.py @@ -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}), -- cgit