summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-11-29 11:15:05 +1100
committerAmitay Isaacs <amitay@gmail.com>2011-11-29 16:00:36 +1100
commit5184fc889327d6e2fb7b446140bd17ea30cb3920 (patch)
tree0dd71ff8de639e2d9eadb753c1bcc67f2bba989a /source4/scripting
parent13545d781b257afe3c3a107a669851c38cdfefbd (diff)
downloadsamba-5184fc889327d6e2fb7b446140bd17ea30cb3920.tar.gz
samba-5184fc889327d6e2fb7b446140bd17ea30cb3920.tar.bz2
samba-5184fc889327d6e2fb7b446140bd17ea30cb3920.zip
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.
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/tests/samba3sam.py5
1 files changed, 5 insertions, 0 deletions
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):