From 59e8321324fe6b652724e71ba1df9da80f30cc67 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 7 Feb 2013 19:35:15 +1100 Subject: [PATCH] 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 --- source4/torture/drs/python/repl_schema.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"]) -- 2.11.4.GIT