diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-11-29 11:15:05 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2011-11-29 16:00:36 +1100 |
commit | 5184fc889327d6e2fb7b446140bd17ea30cb3920 (patch) | |
tree | 0dd71ff8de639e2d9eadb753c1bcc67f2bba989a | |
parent | 13545d781b257afe3c3a107a669851c38cdfefbd (diff) | |
download | samba-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.
-rw-r--r-- | source4/scripting/python/samba/tests/samba3sam.py | 5 |
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): |