From: Douglas Bagnall Date: Wed, 28 Aug 2024 22:56:38 +0000 (+1200) Subject: ldb:test:api_search: use test name as db name X-Git-Tag: tdb-1.4.13~1161 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98d408be8657c3e201141369a069a3e086f805b2;p=thirdparty%2Fsamba.git ldb:test:api_search: use test name as db name This will help enusre we are using the right DB when (in the next commit) we set up the database for each test via copy. It also helps with debugging. Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/api_search.py b/lib/ldb/tests/python/api_search.py index 3b71c6808c9..7ea6c856514 100644 --- a/lib/ldb/tests/python/api_search.py +++ b/lib/ldb/tests/python/api_search.py @@ -29,7 +29,9 @@ class SearchTests(LdbBaseTest): def setUp(self): super().setUp() self.testdir = tempdir() - self.filename = os.path.join(self.testdir, "search_test.ldb") + self.filename = os.path.join( + self.testdir, + f"{self.id().rsplit('.',1)[1]}.ldb") options = ["modules:rdn_name"] if hasattr(self, 'IDXCHECK'): options.append("disable_full_db_scan_for_self_test:1") @@ -1340,7 +1342,9 @@ class LdbResultTests(LdbBaseTest): def setUp(self): super().setUp() self.testdir = tempdir() - self.filename = os.path.join(self.testdir, "test.ldb") + self.filename = os.path.join( + self.testdir, + f"{self.id().rsplit('.',1)[1]}.ldb") self.l = ldb.Ldb(self.url(), flags=self.flags()) try: self.l.add(self.index)