summaryrefslogtreecommitdiff
path: root/source4/torture/drs/python/drs_base.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-07-30 16:00:58 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-31 14:15:29 +0200
commit31787417ca9d01965a9f5221ff6adc48a4b1a15f (patch)
tree89e1e4d3334db90c22d3deb3132a2ab9029a2564 /source4/torture/drs/python/drs_base.py
parent6d1b8ff8a7b803601f8142396e659d0f1dbef331 (diff)
downloadsamba-31787417ca9d01965a9f5221ff6adc48a4b1a15f.tar.gz
samba-31787417ca9d01965a9f5221ff6adc48a4b1a15f.tar.bz2
samba-31787417ca9d01965a9f5221ff6adc48a4b1a15f.zip
s4-repl: Add tests for add replication conflicts and use of LostAndFound
LostAndFound is used when we find children of a deleted object that are not themselves deleted. Andrew Bartlett
Diffstat (limited to 'source4/torture/drs/python/drs_base.py')
-rw-r--r--source4/torture/drs/python/drs_base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py
index abfdbf5bd3..f692edc4f5 100644
--- a/source4/torture/drs/python/drs_base.py
+++ b/source4/torture/drs/python/drs_base.py
@@ -25,6 +25,7 @@ import os
sys.path.insert(0, "bin/python")
import samba
+from samba import dsdb
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
@@ -85,6 +86,13 @@ class DrsBaseTestCase(samba.tests.BlackboxTestCase):
self.assertEquals(len(res), 1)
return str(res[0]["dn"])
+ def _lost_and_found_dn(self, sam_ldb, nc):
+ wkdn = "<WKGUID=%s,%s>" % (dsdb.DS_GUID_LOSTANDFOUND_CONTAINER, nc)
+ res = sam_ldb.search(base=wkdn,
+ scope=SCOPE_BASE)
+ self.assertEquals(len(res), 1)
+ return str(res[0]["dn"])
+
def _make_obj_name(self, prefix):
return prefix + time.strftime("%s", time.gmtime())