1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

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.
This commit is contained in:
Amitay Isaacs 2011-11-29 11:15:05 +11:00
parent 13545d781b
commit 5184fc8893

View File

@ -122,6 +122,11 @@ class MapBaseTestCase(TestCaseInTempDir):
os.unlink(self.ldbfile) os.unlink(self.ldbfile)
os.unlink(self.samba3.file) os.unlink(self.samba3.file)
os.unlink(self.samba4.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() super(MapBaseTestCase, self).tearDown()
def assertSidEquals(self, text, ndr_sid): def assertSidEquals(self, text, ndr_sid):