summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_dns_plugin.py
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-02-03 14:25:53 +0100
committerMartin Kosek <mkosek@redhat.com>2012-02-03 16:25:53 +0100
commite1fecfaf6a9f35d23105661292dea7d68b1cc19c (patch)
treecff67d667454ace14342c0acb7f6d4da40e73b28 /tests/test_xmlrpc/test_dns_plugin.py
parentcb4b2e6facea8fd786384ceb751e6dbedac2be5c (diff)
downloadfreeipa-e1fecfaf6a9f35d23105661292dea7d68b1cc19c.tar.gz
freeipa-e1fecfaf6a9f35d23105661292dea7d68b1cc19c.tar.xz
freeipa-e1fecfaf6a9f35d23105661292dea7d68b1cc19c.zip
Add SRV record target validator
Add missing SRV record target validator to filter out possible user errors. https://fedorahosted.org/freeipa/ticket/2308
Diffstat (limited to 'tests/test_xmlrpc/test_dns_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_dns_plugin.py9
1 files changed, 9 insertions, 0 deletions
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
@@ -566,6 +566,15 @@ class test_dns(Declarative):
),
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}),
expected={