From: Andrew Bartlett Date: Thu, 7 Feb 2013 08:35:15 +0000 (+1100) Subject: torture-drs: Make the samba4.drs.repl_schema.python emit failures, not errors on... X-Git-Tag: tevent-0.9.18~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59e8321324fe6b652724e71ba1df9da80f30cc67;p=thirdparty%2Fsamba.git torture-drs: Make the samba4.drs.repl_schema.python emit failures, not errors on add failure This then allows this particular failure to be masked with a knownfail. Andrew Bartlett Reviewed-by: Stefan Metzmacher --- diff --git a/source4/torture/drs/python/repl_schema.py b/source4/torture/drs/python/repl_schema.py index 166a0eb77f3..cbed6400d65 100644 --- a/source4/torture/drs/python/repl_schema.py +++ b/source4/torture/drs/python/repl_schema.py @@ -84,7 +84,11 @@ class DrsReplSchemaTestCase(drs_base.DrsBaseTestCase): if not attrs is None: rec.update(attrs) # add it to the Schema - ldb_ctx.add(rec) + try: + ldb_ctx.add(rec) + except LdbError, (enum, estr): + self.fail("Adding record failed with %d/%s" % (enum, estr)) + self._ldap_schemaUpdateNow(ldb_ctx) return (rec["lDAPDisplayName"], rec["dn"])