Hello,

This patch prevents the test suite from hitting limitations
in bind-dyndb-ldap 4.0.

It should go to 3.4 (master branch, right?).

--
Petr^2 Spacek
From 39da51eedef455b4d3f436acb0d85de1024debfb Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Fri, 14 Feb 2014 15:06:42 +0100
Subject: [PATCH] tests: Move zone enable/disable tests to end of
 test_dns_plugin.py

This prevents the test suite from hitting limitations
in bind-dyndb-ldap 4.0.
---
 ipatests/test_xmlrpc/test_dns_plugin.py | 146 ++++++++++++++++----------------
 1 file changed, 74 insertions(+), 72 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index e8b791fd9895467af2352eb7f94e0b03e7f42162..744dc4dc1b54bab1376efb4ef7e3f7afaa4ebd66 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -459,78 +459,6 @@ class test_dns(Declarative):
 
 
         dict(
-            desc='Disable zone %r' % zone1,
-            command=('dnszone_disable', [zone1], {}),
-            expected={
-                'value': zone1,
-                'summary': u'Disabled DNS zone "%s"' % zone1,
-                'result': True,
-            },
-        ),
-
-
-        dict(
-            desc='Check if zone %r is really disabled' % zone1,
-            command=('dnszone_show', [zone1], {}),
-            expected={
-                'value': zone1,
-                'summary': None,
-                'result': {
-                    'dn': zone1_dn,
-                    'idnsname': [zone1],
-                    'idnszoneactive': [u'FALSE'],
-                    'nsrecord': [zone1_ns],
-                    'idnssoamname': [zone1_ns],
-                    'idnssoarname': [zone1_rname],
-                    'idnssoaserial': [fuzzy_digits],
-                    'idnssoarefresh': [fuzzy_digits],
-                    'idnssoaretry': [fuzzy_digits],
-                    'idnssoaexpire': [fuzzy_digits],
-                    'idnssoaminimum': [fuzzy_digits],
-                    'idnsallowtransfer': [u'none;'],
-                    'idnsallowquery': [u'any;'],
-                },
-            },
-        ),
-
-
-        dict(
-            desc='Enable zone %r' % zone1,
-            command=('dnszone_enable', [zone1], {}),
-            expected={
-                'value': zone1,
-                'summary': u'Enabled DNS zone "%s"' % zone1,
-                'result': True,
-            },
-        ),
-
-
-        dict(
-            desc='Check if zone %r is really enabled' % zone1,
-            command=('dnszone_show', [zone1], {}),
-            expected={
-                'value': zone1,
-                'summary': None,
-                'result': {
-                    'dn': zone1_dn,
-                    'idnsname': [zone1],
-                    'idnszoneactive': [u'TRUE'],
-                    'nsrecord': [zone1_ns],
-                    'idnssoamname': [zone1_ns],
-                    'idnssoarname': [zone1_rname],
-                    'idnssoaserial': [fuzzy_digits],
-                    'idnssoarefresh': [fuzzy_digits],
-                    'idnssoaretry': [fuzzy_digits],
-                    'idnssoaexpire': [fuzzy_digits],
-                    'idnssoaminimum': [fuzzy_digits],
-                    'idnsallowtransfer': [u'none;'],
-                    'idnsallowquery': [u'any;'],
-                },
-            },
-        ),
-
-
-        dict(
             desc='Try to retrieve non-existent record %r in zone %r' % (name1, zone1),
             command=('dnsrecord_show', [zone1, name1], {}),
             expected=errors.NotFound(
@@ -1776,4 +1704,78 @@ class test_dns(Declarative):
                 error=u"invalid domain-name: only letters, numbers, '-' are allowed." +
                 u" DNS label may not start or end with '-'"),
         ),
+
+
+        dict(
+            desc='Disable zone %r' % zone1,
+            command=('dnszone_disable', [zone1], {}),
+            expected={
+                'value': zone1,
+                'summary': u'Disabled DNS zone "%s"' % zone1,
+                'result': True,
+            },
+        ),
+
+
+        dict(
+            desc='Check if zone %r is really disabled' % zone1,
+            command=('dnszone_show', [zone1], {}),
+            expected={
+                'value': zone1,
+                'summary': None,
+                'result': {
+                    'dn': zone1_dn,
+                    'idnsname': [zone1],
+                    'idnszoneactive': [u'FALSE'],
+                    'idnssoamname': [zone1 + u'.'],
+                    'nsrecord': [zone1 + u'.'],
+                    'arecord': [zone1_ip],
+                    'idnssoarname': [zone1_rname],
+                    'idnssoaserial': [fuzzy_digits],
+                    'idnssoarefresh': [fuzzy_digits],
+                    'idnssoaretry': [fuzzy_digits],
+                    'idnssoaexpire': [fuzzy_digits],
+                    'idnssoaminimum': [fuzzy_digits],
+                    'idnsallowtransfer': [u'none;'],
+                    'idnsallowquery': [u'any;'],
+                },
+            },
+        ),
+
+
+        dict(
+            desc='Enable zone %r' % zone1,
+            command=('dnszone_enable', [zone1], {}),
+            expected={
+                'value': zone1,
+                'summary': u'Enabled DNS zone "%s"' % zone1,
+                'result': True,
+            },
+        ),
+
+
+        dict(
+            desc='Check if zone %r is really enabled' % zone1,
+            command=('dnszone_show', [zone1], {}),
+            expected={
+                'value': zone1,
+                'summary': None,
+                'result': {
+                    'dn': zone1_dn,
+                    'idnsname': [zone1],
+                    'idnszoneactive': [u'TRUE'],
+                    'idnssoamname': [zone1 + u'.'],
+                    'nsrecord': [zone1 + u'.'],
+                    'arecord': [zone1_ip],
+                    'idnssoarname': [zone1_rname],
+                    'idnssoaserial': [fuzzy_digits],
+                    'idnssoarefresh': [fuzzy_digits],
+                    'idnssoaretry': [fuzzy_digits],
+                    'idnssoaexpire': [fuzzy_digits],
+                    'idnssoaminimum': [fuzzy_digits],
+                    'idnsallowtransfer': [u'none;'],
+                    'idnsallowquery': [u'any;'],
+                },
+            },
+        ),
     ]
-- 
1.8.3.1

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

Reply via email to