mirror of
https://github.com/samba-team/samba.git
synced 2025-11-26 04:23:49 +03:00
r26596: Fixed upgrade.py.
Added blackbox tests for provision and upgrade Python scripts. Clean up temporary files created by the Python tests.
This commit is contained in:
committed by
Stefan Metzmacher
parent
64203a6b7b
commit
2227fb6df6
@@ -67,7 +67,12 @@ class SubstituteVarTestCase(unittest.TestCase):
|
||||
|
||||
class LdbExtensionTests(TestCaseInTempDir):
|
||||
def test_searchone(self):
|
||||
l = samba.Ldb(self.tempdir + "/searchone.ldb")
|
||||
l.add({"dn": "foo=dc", "bar": "bla"})
|
||||
self.assertEquals("bla", l.searchone(ldb.Dn(l, "foo=dc"), "bar"))
|
||||
path = self.tempdir + "/searchone.ldb"
|
||||
l = samba.Ldb(path)
|
||||
try:
|
||||
l.add({"dn": "foo=dc", "bar": "bla"})
|
||||
self.assertEquals("bla", l.searchone(ldb.Dn(l, "foo=dc"), "bar"))
|
||||
finally:
|
||||
del l
|
||||
os.unlink(path)
|
||||
|
||||
|
||||
@@ -29,10 +29,14 @@ def setup_path(file):
|
||||
|
||||
class ProvisionTestCase(samba.tests.TestCaseInTempDir):
|
||||
def test_setup_secretsdb(self):
|
||||
ldb = setup_secretsdb(os.path.join(self.tempdir, "secrets.ldb"),
|
||||
setup_path, None, None, None)
|
||||
self.assertEquals("LSA Secrets",
|
||||
path = os.path.join(self.tempdir, "secrets.ldb")
|
||||
ldb = setup_secretsdb(path, setup_path, None, None, None)
|
||||
try:
|
||||
self.assertEquals("LSA Secrets",
|
||||
ldb.searchone(Dn(ldb, "CN=LSA Secrets"), "CN"))
|
||||
finally:
|
||||
del ldb
|
||||
os.unlink(path)
|
||||
|
||||
|
||||
class Disabled:
|
||||
|
||||
Reference in New Issue
Block a user