1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

pytest/downgradedatabase: use TestCaseInTempDir.rm_files

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15191
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15189

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
(cherry picked from commit 85bc1552e3919d049d39a065824172a24933d38b)
This commit is contained in:
Douglas Bagnall 2022-06-15 13:19:28 +12:00 committed by Jule Anger
parent 2003f7cf74
commit 70de610892

View File

@ -18,7 +18,6 @@
from samba.tests import BlackboxTestCase
import os
import ldb
import shutil
from subprocess import check_output
from samba.samdb import SamDB
@ -57,13 +56,12 @@ class DowngradeTestBase(BlackboxTestCase):
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"))
self.rm_dirs("private",
"etc",
"state",
"bind-dns",
"msg.lock")
self.rm_files("names.tdb", "gencache.tdb")
super(DowngradeTestBase, self).tearDown()
# Parse out the comments above each record that ldbdump produces