[SCM] Samba Shared Repository - branch master updated
Kamen Mazdrashki
kamenim at samba.org
Tue Jan 25 13:31:02 MST 2011
The branch, master has been updated
via 6e22637 s4-test/delete_object: Remove global ldb connections
from 932911e s4:ldap.py - check the write protection on LSA objects
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6e2263749ab108baf7543a651123041427af96db
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sat Jan 22 03:22:48 2011 +0200
s4-test/delete_object: Remove global ldb connections
Make it more xUnit compliant
Autobuild-User: Kamen Mazdrashki <kamenim at samba.org>
Autobuild-Date: Tue Jan 25 21:30:19 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/torture/drs/python/delete_object.py | 33 +++++---------------------
1 files changed, 7 insertions(+), 26 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index 0693898..ccc412e 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -42,35 +42,16 @@ import samba.tests
class DrsDeleteObjectTestCase(samba.tests.TestCase):
- # RootDSE msg for DC1
- info_dc1 = None
- ldb_dc1 = None
- # RootDSE msg for DC1
- info_dc2 = None
- ldb_dc2 = None
-
def setUp(self):
super(DrsDeleteObjectTestCase, self).setUp()
- # connect to DCs singleton
- if self.ldb_dc1 is None:
- DrsDeleteObjectTestCase.dc1 = samba.tests.env_get_var_value("DC1")
- DrsDeleteObjectTestCase.ldb_dc1 = samba.tests.connect_samdb(self.dc1, ldap_only=True)
- if self.ldb_dc2 is None:
- DrsDeleteObjectTestCase.dc2 = samba.tests.env_get_var_value("DC2")
- DrsDeleteObjectTestCase.ldb_dc2 = samba.tests.connect_samdb(self.dc2, ldap_only=True)
-
- # fetch rootDSEs
- if self.info_dc1 is None:
- ldb = self.ldb_dc1
- res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
- self.assertEquals(len(res), 1)
- DrsDeleteObjectTestCase.info_dc1 = res[0]
- if self.info_dc2 is None:
- ldb = self.ldb_dc2
- res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
- self.assertEquals(len(res), 1)
- DrsDeleteObjectTestCase.info_dc2 = res[0]
+ # connect to DCs
+ url_dc = samba.tests.env_get_var_value("DC1")
+ (self.ldb_dc1, self.info_dc1) = samba.tests.connect_samdb_ex(url_dc,
+ ldap_only=True)
+ url_dc = samba.tests.env_get_var_value("DC2")
+ (self.ldb_dc2, self.info_dc2) = samba.tests.connect_samdb_ex(url_dc,
+ ldap_only=True)
# cache some of RootDSE props
self.schema_dn = self.info_dc1["schemaNamingContext"][0]
--
Samba Shared Repository
More information about the samba-cvs
mailing list