[SCM] Samba Shared Repository - branch master updated
Kamen Mazdrashki
kamenim at samba.org
Wed Sep 22 06:06:55 MDT 2010
The branch, master has been updated
via 0027af0 s4-drs-test: Relax a check that may possibly fail
via e3b81c6 s4-ldapcmp: Enable comparisons between LDBs too
from e12e661 s4-selftest: Move more tests to scripting/python, simplifies running of tests.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0027af02d2d0114b2e1e06b49e590db1efe38879
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Wed Sep 22 03:57:30 2010 +0300
s4-drs-test: Relax a check that may possibly fail
This check may fail due to automatic replication between DCs
during the test execution.
Ideally we should block automatic replications (somehow)
during this test. But until then, we need just to skip
this check, it is not *that* important anyway
commit e3b81c6062c9b82d246ac8103c07c246e2a72250
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Wed Sep 22 03:24:01 2010 +0300
s4-ldapcmp: Enable comparisons between LDBs too
This will enable us to compare two LDBs or and LDB with running
AD server. Comparing LDB against running running server
may come into handy when one want to see if 'net vampire'
command does what it does the right way
-----------------------------------------------------------------------
Summary of changes:
source4/scripting/devel/ldapcmp | 15 ++++++++++++---
source4/torture/drs/python/delete_object.py | 8 +++++++-
2 files changed, 19 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/scripting/devel/ldapcmp b/source4/scripting/devel/ldapcmp
index edf37d3..689c202 100755
--- a/source4/scripting/devel/ldapcmp
+++ b/source4/scripting/devel/ldapcmp
@@ -43,10 +43,19 @@ summary = {}
class LDAPBase(object):
def __init__(self, host, cmd_opts, creds, lp):
+ ldb_options = []
+ samdb_url = host
if not "://" in host:
- self.host = "ldap://" + host + ":389"
- self.ldb = Ldb(self.host, credentials=creds, lp=lp,
- options=["modules:paged_searches"])
+ if os.path.isfile(host):
+ samdb_url = "tdb://%s" % host
+ else:
+ samdb_url = "ldap://%s:389" % host
+ # user 'paged_search' module when connecting remotely
+ ldb_options = ["modules:paged_searches"]
+ self.ldb = Ldb(url=samdb_url,
+ credentials=creds,
+ lp=lp,
+ options=ldb_options)
self.two_domains = cmd_opts.two
self.quiet = cmd_opts.quiet
self.host = host
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index 20f8530..d494204 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -184,7 +184,13 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase):
# check user info on DC1 - should be deleted
self._check_user(sam_ldb=self.ldb_dc1, user_orig=user_orig, is_deleted=True)
# check user info on DC2 - should be valid user
- self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
+ try:
+ self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
+ except self.failureException:
+ print ("Checking for not isDeleted user on %s failed, "
+ "probably because a replication took place. "
+ "Ideally we should block automatic replications during this test, "
+ "but until then, just ignore the error" % self.dnsname_dc2)
# trigger replication from DC2 to DC1
# to check if deleted object gets restored
--
Samba Shared Repository
More information about the samba-cvs
mailing list