1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ldb:test:api_search: skip LMDB tests at class level

LMDB is not going to turn up midway through the testsuite, so we might
as well skip the whole class

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Douglas Bagnall 2024-08-29 12:23:55 +12:00 committed by Andreas Schneider
parent d9225d2460
commit 235c7d15ef

View File

@ -1200,10 +1200,11 @@ class SearchTestsLmdb(SearchTests):
def add_index(cls, db):
db.add(MDB_INDEX_OBJ)
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
class IndexedSearchTests(SearchTests):
@ -1346,27 +1347,31 @@ class GUIDAndOneLevelIndexedSearchTests(SearchTests):
class GUIDIndexedSearchTestsLmdb(GUIDIndexedSearchTests):
prefix = MDB_PREFIX
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
class GUIDIndexedDNFilterSearchTestsLmdb(GUIDIndexedDNFilterSearchTests):
prefix = MDB_PREFIX
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
class GUIDAndOneLevelIndexedSearchTestsLmdb(GUIDAndOneLevelIndexedSearchTests):
prefix = MDB_PREFIX
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
class LdbResultTests(LdbBaseTest):
@ -1664,10 +1669,11 @@ class LdbResultTestsLmdb(LdbResultTests):
def add_index(cls, db):
db.add(MDB_INDEX_OBJ)
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
class NestedTransactionTests(LdbBaseTest):
@ -1765,10 +1771,11 @@ class LmdbNestedTransactionTests(NestedTransactionTests):
def add_index(cls, db):
db.add(MDB_INDEX_OBJ)
def setUp(self):
@classmethod
def setUpClass(cls):
if os.environ.get('HAVE_LMDB', '1') == '0':
self.skipTest("No lmdb backend")
super().setUp()
cls.skipTest("No lmdb backend")
super().setUpClass()
if __name__ == '__main__':