From 2cf58937615c28527d1c78f883dad8726331c6df Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Fri, 10 Feb 2012 12:54:49 +0100 Subject: Global DNS options Implement API for DNS global options supported in bind-dyndb-ldap. Currently, global DNS option overrides any relevant option in named.conf. Thus they are not filled by default they are left as a possibility for a user. Bool encoding had to be fixed so that Bool LDAP attribute can also be deleted and not just set to True or False. https://fedorahosted.org/freeipa/ticket/2216 --- tests/test_xmlrpc/test_dns_plugin.py | 14 ++++++++++++++ tests/test_xmlrpc/xmlrpc_test.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py index 9d83d924..4ad67ce8 100644 --- a/tests/test_xmlrpc/test_dns_plugin.py +++ b/tests/test_xmlrpc/test_dns_plugin.py @@ -64,6 +64,7 @@ class test_dns(Declarative): ('dnsrecord_del', [dnszone1, dnsres1], {'del_all' : True}), ('dnszone_del', [dnszone2], {}), ('dnszone_del', [revdnszone1], {}), + ('dnsconfig_mod', [], {'idnsforwarders' : None,}) ] tests = [ @@ -773,6 +774,19 @@ class test_dns(Declarative): ), + dict( + desc='Update global DNS settings', + command=('dnsconfig_mod', [], {'idnsforwarders' : [u'80.142.15.80'],}), + expected={ + 'value': u'', + 'summary': None, + 'result': { + 'idnsforwarders': [u'80.142.15.80'], + }, + }, + ), + + dict( desc='Delete zone %r' % dnszone1, command=('dnszone_del', [dnszone1], {}), diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index 4966cb1f..fd30cc63 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -222,7 +222,7 @@ class Declarative(XMLRPC_test): ) try: api.Command[cmd](*args, **options) - except errors.NotFound: + except (errors.NotFound, errors.EmptyModlist): pass def test_generator(self): -- cgit