summaryrefslogtreecommitdiffstats
path: root/python/samba/tests/dns.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-12-19 15:14:22 +1300
committerGarming Sam <garming@samba.org>2014-12-22 08:21:22 +0100
commitad074795e33b676595aa7fb1b0129a0b5b8cbf24 (patch)
tree464bf6d8f8b458effda044333b31a8c23a408d33 /python/samba/tests/dns.py
parenteabc177bf674a43f6b9442c8a89af0203befb3f1 (diff)
downloadsamba-ad074795e33b676595aa7fb1b0129a0b5b8cbf24.tar.gz
samba-ad074795e33b676595aa7fb1b0129a0b5b8cbf24.tar.xz
samba-ad074795e33b676595aa7fb1b0129a0b5b8cbf24.zip
dns.py: Always remove the test zone in tearDown()
Change-Id: Ic6d6c51579f8859b4e396179123974382c253bf7 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon Dec 22 08:21:22 CET 2014 on sn-devel-104
Diffstat (limited to 'python/samba/tests/dns.py')
-rw-r--r--python/samba/tests/dns.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index ac946af459..92ac876ff3 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -888,6 +888,14 @@ class TestZones(DNSTest):
self.rpc_conn = dnsserver.dnsserver("ncacn_ip_tcp:%s" % (self.server),
self.lp, self.creds)
+ def tearDown(self):
+ super(TestZones, self).tearDown()
+ try:
+ self.delete_zone(self.zone)
+ except RuntimeError, (num, string):
+ if num != 9601: #WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST
+ raise
+
def create_zone(self, zone):
zone_create = dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN()
zone_create.pszZoneName = zone