"@IDX_DN_GUID": [b"GUID"]
}
+
def tempdir():
import tempfile
try:
self.assertRaises(ldb.LdbError, lambda: l.search("", ldb.SCOPE_SUBTREE, "&(dc=*)(dn=*)", ["dc"]))
# Run the SimpleLdb tests against an lmdb backend
+
+
class SimpleLdbLmdb(SimpleLdb):
def setUp(self):
def tearDown(self):
super(SimpleLdbLmdb, self).tearDown()
+
class SearchTests(LdbBaseTest):
def tearDown(self):
shutil.rmtree(self.testdir)
"@IDXATTR": [b"x", b"y", b"ou"]})
self.IDX = True
+
class IndexedCheckSearchTests(IndexedSearchTests):
"""Test searches using the index, to ensure the index doesn't
break things (full scan disabled)"""
self.IDXCHECK = True
super(IndexedCheckSearchTests, self).setUp()
+
class IndexedSearchDnFilterTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
"@IDXATTR": [b"x", b"y", b"ou"]})
self.IDX = True
+
class IndexedAndOneLevelSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
self.IDX = True
self.IDXONE = True
+
class IndexedCheckedAndOneLevelSearchTests(IndexedAndOneLevelSearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things (full scan disabled)"""
self.IDXCHECK = True
super(IndexedCheckedAndOneLevelSearchTests, self).setUp()
+
class IndexedAndOneLevelDNFilterSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
self.IDX = True
self.IDXONE = True
+
class GUIDIndexedSearchTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
self.IDX = True
self.IDXGUID = True
+
class GUIDAndOneLevelIndexedSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
self.IDXGUID = True
self.IDXONE = True
+
class GUIDIndexedSearchTestsLmdb(GUIDIndexedSearchTests):
def setUp(self):
def tearDown(self):
super(AddModifyTestsLmdb, self).tearDown()
+
class IndexedAddModifyTests(AddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
"x": "z", "y": "a",
"objectUUID": b"0123456789abcde2"})
+
class GUIDIndexedAddModifyTests(IndexedAddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
self.l.transaction_commit()
super(GUIDTransIndexedAddModifyTests, self).tearDown()
+
class TransIndexedAddModifyTests(IndexedAddModifyTests):
"""Test index behaviour insdie the transaction"""
self.l.transaction_commit()
super(TransIndexedAddModifyTests, self).tearDown()
+
class GuidIndexedAddModifyTestsLmdb(GUIDIndexedAddModifyTests):
def setUp(self):
def tearDown(self):
super(GuidIndexedAddModifyTestsLmdb, self).tearDown()
+
class GuidTransIndexedAddModifyTestsLmdb(GUIDTransIndexedAddModifyTests):
def setUp(self):
def tearDown(self):
super(GuidTransIndexedAddModifyTestsLmdb, self).tearDown()
+
class BadIndexTests(LdbBaseTest):
def setUp(self):
super(BadIndexTests, self).setUp()
super(GUIDBadIndexTests, self).setUp()
+
class DnTests(TestCase):
def setUp(self):
dn = ldb.Dn(self.ldb, '')
self.assertTrue(dn.is_null())
+
class LdbMsgTests(TestCase):
def setUp(self):
l = ldb.Ldb(self.filename)
self.assertEqual(["init"], ops)
+
class LdbResultTests(LdbBaseTest):
def setUp(self):