from samba.tests import BlackboxTestCase
import os
import ldb
+import shutil
from subprocess import check_output
from samba.samdb import SamDB
if not hasattr(self, "backend"):
self.fail("Subclass this class and set 'backend'")
- # Don't assert on empty tempdir contents on tearDown
- self.check_tempdir_empty = False
-
prov_cmd = "samba-tool domain provision " +\
"--domain FOO --realm foo.example.com " +\
"--targetdir {self.tempdir} " +\
for p in partitions]
self.dbs.append(self.sam_path)
+ def tearDown(self):
+ shutil.rmtree(os.path.join(self.tempdir, "private"))
+ shutil.rmtree(os.path.join(self.tempdir, "etc"))
+ shutil.rmtree(os.path.join(self.tempdir, "state"))
+ shutil.rmtree(os.path.join(self.tempdir, "bind-dns"))
+ shutil.rmtree(os.path.join(self.tempdir, "msg.lock"))
+ os.unlink(os.path.join(self.tempdir, "names.tdb"))
+ os.unlink(os.path.join(self.tempdir, "gencache.tdb"))
+ super(DowngradeTestBase, self).tearDown()
+
# Parse out the comments above each record that ldbdump produces
# containing pack format version and KV level key for each record.
# Return all GUID keys and DN keys (without @attrs), and the set