]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:test:api_search: use test name as db name
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 28 Aug 2024 22:56:38 +0000 (10:56 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Sep 2024 09:14:38 +0000 (09:14 +0000)
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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb/tests/python/api_search.py

index 3b71c6808c9163df3ae38f53557520f5138c274e..7ea6c856514722a79fb3bd7849ee388f876c6d81 100644 (file)
@@ -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)