This patch adds 2 missing DNS tests:
* removing non-existent permission
* removing idnssoamname value using dnszone-mod --name-server=

Patch attached, belongs to ipa-4-1 and master branches.

--
Martin Basti

From ebaecee49b50e341b3d9e26ecd4722b21dc3ac4a Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 1 Oct 2014 13:21:19 +0200
Subject: [PATCH] DNS missing tests

* try to remove non-existent permission
* try to remove idnssoamname using dnszone-mod --name-server=
---
 ipatests/test_xmlrpc/test_dns_plugin.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index b5df897fcbde509e2fd727c79797fd4e76d6dd61..0f9b16ba7e9c1ff58f0ae0f270172cb610e4f631 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -507,6 +507,15 @@ class test_dns(Declarative):
             },
         ),
 
+        dict(
+            desc='Try to remove value of "idnssomrname" attribute using dnszone-mod --name-server=',
+            command=(
+                'dnszone_mod', [zone2], {
+                    'idnssoamname': None,
+                }
+            ),
+            expected=errors.ValidationError(name='name_server', error=u"is required"),
+        ),
 
         dict(
             desc='Create a zone with upper case name',
@@ -1886,6 +1895,17 @@ class test_dns(Declarative):
                                      % zone1_permission)
         ),
 
+
+        dict(
+            desc='Try to remove non-existent per-zone permission for zone %r' % zone1,
+            command=(
+                'dnszone_remove_permission', [zone1], {}
+            ),
+            expected=errors.NotFound(reason=u'%s: permission not found'
+                                     % zone1_permission)
+        ),
+
+
         dict(
             desc='Try to create zone %r with relative nameserver' % zone3,
             command=(
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to