summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-02-03 10:01:27 +0100
committerMartin Kosek <mkosek@redhat.com>2012-02-03 16:24:54 +0100
commite41282fbc693e24535956c8822786e9e0bc3e8b4 (patch)
tree8a18c374354ea0e2653486129363fc18ce2ec354 /tests
parent2a667d94ec1ad8834f79e12b6e55745deca1cd4d (diff)
downloadfreeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.tar.gz
freeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.tar.xz
freeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.zip
Fix TXT record parsing
TXT record validation fails to parse the record if it contains spaces. Standard DNS part parser uses a space to divide record parts. A special parser thus need to be implemented for this RR type. https://fedorahosted.org/freeipa/ticket/2306
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_dns_plugin.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py
index bded2ad4..f65fe563 100644
--- a/tests/test_xmlrpc/test_dns_plugin.py
+++ b/tests/test_xmlrpc/test_dns_plugin.py
@@ -649,6 +649,24 @@ class test_dns(Declarative):
),
dict(
+ desc='Add TXT record to %r using dnsrecord_add' % (dnsres1),
+ command=('dnsrecord_add', [dnszone1, dnsres1], {'txtrecord': u'foo bar' }),
+ expected={
+ 'value': dnsres1,
+ 'summary': None,
+ 'result': {
+ 'objectclass': [u'top', u'idnsrecord'],
+ 'dn': unicode(dnsres1_dn),
+ 'idnsname': [dnsres1],
+ 'arecord': [u'10.10.0.1'],
+ 'cnamerecord': [u'foo-1.example.com.'],
+ 'kxrecord': [u'1 foo-1'],
+ 'txtrecord': [u'foo bar'],
+ },
+ },
+ ),
+
+ dict(
desc='Delete record %r in zone %r' % (dnsres1, dnszone1),
command=('dnsrecord_del', [dnszone1, dnsres1], {'del_all': True }),
expected={