From 341477347db9477e0bc34cadce31088108866772 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 2009 11:12:10 +1000 Subject: [PATCH] fixed the updateNow schema test to use a canonical OID The expression time.strftime("%s", time.gmtime())[3:] leads to a string with a leading 0. When added then read back from the prefix map this leads to a different string, so it is never found. Use the simpler str(random.randint(a,b)) expression instead --- source4/lib/ldb/tests/python/ldap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py index 24c6226ce44..af3ad1c2aed 100755 --- a/source4/lib/ldb/tests/python/ldap.py +++ b/source4/lib/ldb/tests/python/ldap.py @@ -6,6 +6,7 @@ import getopt import optparse import sys import time +import random sys.path.append("bin/python") sys.path.append("../lib/subunit/python") @@ -1167,7 +1168,7 @@ cn: """ + class_name + """ objectCategory: CN=Class-Schema,""" + self.schema_dn + """ defaultObjectCategory: CN=%s,%s""" % (class_name, self.schema_dn) + """ distinguishedName: CN=%s,%s""" % (class_name, self.schema_dn) + """ -governsID: 1.2.840.""" + time.strftime("%s", time.gmtime())[3:] + """.1.5.9939 +governsID: 1.2.840.""" + str(random.randint(1,100000)) + """.1.5.9939 instanceType: 4 name: """ + class_name + """ objectClassCategory: 1 -- 2.34.1