From ad074795e33b676595aa7fb1b0129a0b5b8cbf24 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 19 Dec 2014 15:14:22 +1300 Subject: [PATCH] dns.py: Always remove the test zone in tearDown() Change-Id: Ic6d6c51579f8859b4e396179123974382c253bf7 Signed-off-by: Garming Sam Pair-programmed-with: Garming Sam Signed-off-by: Andrew Bartlett Autobuild-User(master): Garming Sam Autobuild-Date(master): Mon Dec 22 08:21:22 CET 2014 on sn-devel-104 --- python/samba/tests/dns.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py index ac946af4591..92ac876ff35 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 -- 2.11.4.GIT