diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-08-17 11:12:10 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-08-17 11:14:07 +1000 |
commit | 341477347db9477e0bc34cadce31088108866772 (patch) | |
tree | 8dbf8ed560229468cf8f913004ccb8d339a3da42 /source4/lib/ldb/tests/python/ldap.py | |
parent | ca526fbb3ee4131f1dae2b68f5f0f6b8c49ff711 (diff) | |
download | samba-341477347db9477e0bc34cadce31088108866772.tar.gz samba-341477347db9477e0bc34cadce31088108866772.tar.bz2 samba-341477347db9477e0bc34cadce31088108866772.zip |
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
Diffstat (limited to 'source4/lib/ldb/tests/python/ldap.py')
-rwxr-xr-x | source4/lib/ldb/tests/python/ldap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py index 24c6226ce4..af3ad1c2ae 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 |