From 5184fc889327d6e2fb7b446140bd17ea30cb3920 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 29 Nov 2011 11:15:05 +1100 Subject: s4-test: Remove metadata and ldb.d directory on clean up When using partitions, metadata.tdb automatically gets created in ${prefix}ldb.d/ directory. To correctly clean up check if metadata.tdb exists, then remove metadata.tdb and directory. --- source4/scripting/python/samba/tests/samba3sam.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/tests/samba3sam.py b/source4/scripting/python/samba/tests/samba3sam.py index 63c9a4c1f4..6b9ce7b3d4 100644 --- a/source4/scripting/python/samba/tests/samba3sam.py +++ b/source4/scripting/python/samba/tests/samba3sam.py @@ -122,6 +122,11 @@ class MapBaseTestCase(TestCaseInTempDir): os.unlink(self.ldbfile) os.unlink(self.samba3.file) os.unlink(self.samba4.file) + pdir = "%s.d" % self.ldbfile + mdata = os.path.join(pdir, "metadata.tdb") + if os.path.exists(mdata): + os.unlink(mdata) + os.rmdir(pdir) super(MapBaseTestCase, self).tearDown() def assertSidEquals(self, text, ndr_sid): -- cgit