mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4-dsdb/tests/python: Explicitly pass comamnd line LoadParm() instance to system_session()
Otherwise system_session() creates a LoadParm() instance which resets certain global parameters to their defaults from smb.conf ("log level" for instance) Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Wed Dec 15 15:10:47 CET 2010 on sn-devel-104
This commit is contained in:
@ -1518,7 +1518,7 @@ class AclExtendedTests(AclTests):
|
|||||||
|
|
||||||
if not "://" in host:
|
if not "://" in host:
|
||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp)
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp)
|
||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
|
@ -379,7 +379,7 @@ if not "://" in host:
|
|||||||
else:
|
else:
|
||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
|
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp)
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp)
|
||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
|
@ -2647,10 +2647,10 @@ if not "://" in host:
|
|||||||
else:
|
else:
|
||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
|
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp)
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp)
|
||||||
if not "tdb://" in host:
|
if not "tdb://" in host:
|
||||||
gc_ldb = Ldb("%s:3268" % host, credentials=creds,
|
gc_ldb = Ldb("%s:3268" % host, credentials=creds,
|
||||||
session_info=system_session(), lp=lp)
|
session_info=system_session(lp), lp=lp)
|
||||||
else:
|
else:
|
||||||
gc_ldb = None
|
gc_ldb = None
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ if host.startswith("ldap://"):
|
|||||||
# user 'paged_search' module when connecting remotely
|
# user 'paged_search' module when connecting remotely
|
||||||
ldb_options = ["modules:paged_searches"]
|
ldb_options = ["modules:paged_searches"]
|
||||||
|
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp, options=ldb_options)
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp, options=ldb_options)
|
||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
|
@ -376,7 +376,7 @@ name: """ + object_name + """
|
|||||||
self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
|
self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
ldb = samba.tests.connect_samdb(host, credentials=creds, session_info=system_session(), lp=lp)
|
ldb = samba.tests.connect_samdb(host, credentials=creds, session_info=system_session(lp), lp=lp)
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
if not runner.run(unittest.makeSuite(SyntaxTests)).wasSuccessful():
|
if not runner.run(unittest.makeSuite(SyntaxTests)).wasSuccessful():
|
||||||
|
@ -919,7 +919,7 @@ if not "://" in host:
|
|||||||
else:
|
else:
|
||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
|
|
||||||
ldb = SamDB(url=host, session_info=system_session(), credentials=creds, lp=lp)
|
ldb = SamDB(url=host, session_info=system_session(lp), credentials=creds, lp=lp)
|
||||||
|
|
||||||
# Gets back the basedn
|
# Gets back the basedn
|
||||||
base_dn = ldb.domain_dn()
|
base_dn = ldb.domain_dn()
|
||||||
|
@ -2363,7 +2363,7 @@ if not "://" in host:
|
|||||||
else:
|
else:
|
||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
|
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp)
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp)
|
||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
|
@ -1862,7 +1862,7 @@ if host.lower().startswith("ldap://"):
|
|||||||
|
|
||||||
ldb = SamDB(host,
|
ldb = SamDB(host,
|
||||||
credentials=creds,
|
credentials=creds,
|
||||||
session_info=system_session(),
|
session_info=system_session(lp),
|
||||||
lp=lp,
|
lp=lp,
|
||||||
options=ldb_options)
|
options=ldb_options)
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ if not "://" in host:
|
|||||||
host = "ldap://%s" % host
|
host = "ldap://%s" % host
|
||||||
|
|
||||||
|
|
||||||
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp,
|
ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp,
|
||||||
global_schema=False)
|
global_schema=False)
|
||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
|
Reference in New Issue
Block a user