diff options
Diffstat (limited to 'contrib/slapd-modules/datamorph/tests/data')
22 files changed, 1136 insertions, 0 deletions
diff --git a/contrib/slapd-modules/datamorph/tests/data/config.ldif b/contrib/slapd-modules/datamorph/tests/data/config.ldif new file mode 100644 index 0000000..91f2e60 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/config.ldif @@ -0,0 +1,108 @@ +dn: cn=datamorph,cn=schema,cn=config +changetype: add +objectClass: olcSchemaConfig +olcAttributeTypes: ( 1.3.6.1.4.1.4203.666.11.12.123.1 + NAME 'enumerated' + DESC 'Enumerated attribute' + EQUALITY fixedSizeIntegerMatch + ORDERING fixedSizeIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.2 ) +olcAttributeTypes: ( 1.3.6.1.4.1.4203.666.11.12.123.2 + NAME 'number' + DESC 'Integer attribute' + EQUALITY fixedSizeIntegerMatch + ORDERING fixedSizeIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.3 ) +olcAttributeTypes: ( 1.3.6.1.4.1.4203.666.11.12.123.3 + NAME 'signed' + DESC 'Signed integer attribute' + EQUALITY fixedSizeSignedIntegerMatch + ORDERING fixedSizeSignedIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.4 ) +olcObjectClasses: ( 1.3.6.1.4.1.4203.666.11.12.123.4 + NAME 'transformedObject' + DESC 'Testing objectclass' + SUP top AUXILIARY + MAY ( enumerated $ number $ signed ) ) + +dn: olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectClass: olcOverlayConfig +objectclass: olcDatamorphConfig + +# a basic enum +dn: olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnum + +dn: olcDatamorphValue=bjensen,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 1 + +dn: olcDatamorphValue=bjorn,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 11 + +dn: olcDatamorphValue=dots,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 12 + +dn: olcDatamorphValue=jaj,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 13 + +dn: olcDatamorphValue=jjones,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 14 + +dn: olcDatamorphValue=jdoe,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 10 + +dn: olcDatamorphValue=jen,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 101 + +dn: olcDatamorphValue=johnd,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 20 + +dn: olcDatamorphValue=melliot,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 51 + +dn: olcDatamorphValue=uham,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 31 + +dn: olcDatamorphValue=\5Cno \22name\22,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 200 + +# an interval +dn: olcDatamorphAttribute=signed,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphInteger +olcDatamorphIntegerBytes: 2 +olcDatamorphIntegerSigned: TRUE +olcDatamorphIntegerLowerBound: -20000 +olcDatamorphIntegerUpperBound: 30000 + +# an number interval (essentially TRUE/FALSE) +dn: olcDatamorphAttribute=number,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphInteger +olcDatamorphIntegerBytes: 1 +olcDatamorphIntegerUpperBound: 1 +olcDatamorphIntegerSigned: FALSE diff --git a/contrib/slapd-modules/datamorph/tests/data/datamorph.conf b/contrib/slapd-modules/datamorph/tests/data/datamorph.conf new file mode 100644 index 0000000..7cc4899 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/datamorph.conf @@ -0,0 +1,49 @@ +overlay datamorph + +# they depend on the syntaxes defined by the overlay +attributetype ( 1.3.6.1.4.1.4203.666.11.12.123.1 NAME 'enumerated' + DESC 'Enumerated attribute' + EQUALITY fixedSizeIntegerMatch + ORDERING fixedSizeIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.2 ) + +attributetype ( 1.3.6.1.4.1.4203.666.11.12.123.2 NAME 'number' + DESC 'Integer attribute' + EQUALITY fixedSizeIntegerMatch + ORDERING fixedSizeIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.3 ) + +attributetype ( 1.3.6.1.4.1.4203.666.11.12.123.3 NAME 'signed' + DESC 'Signed integer attribute' + EQUALITY fixedSizeSignedIntegerMatch + ORDERING fixedSizeSignedIntegerOrderingMatch + SYNTAX 1.3.6.1.4.1.4203.666.11.12.1.4 ) + +objectclass ( 1.3.6.1.4.1.4203.666.11.12.123.4 NAME 'transformedObject' + DESC 'Testing objectclass' + SUP top AUXILIARY + MAY ( enumerated $ number $ signed ) ) + +datamorph eNuM enumerated +datamorph_value 1 bjensen +datamorph_value 11 bjorn +datamorph_value 12 dots +datamorph_value "13" jaj +datamorph_value 14 jjones +datamorph_value 10 jdoe +datamorph_value 101 jen +datamorph_value 20 johnd +datamorph_value 51 "melliot" +datamorph_value 31 uham +datamorph_value 200 "\\no \"name\"" + +datamorph int signed +datamorph_size 2 +datamorph_signed TRUE +datamorph_lower_bound -20000 +datamorph_upper_bound 30000 + +datamorph iNT number +datamorph_size 1 +datamorph_signed no +datamorph_upper_bound 1 diff --git a/contrib/slapd-modules/datamorph/tests/data/test.ldif b/contrib/slapd-modules/datamorph/tests/data/test.ldif new file mode 100644 index 0000000..67971f3 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test.ldif @@ -0,0 +1,434 @@ +#LEAD COMMENT +dn: dc=example,dc=com +#EMBEDDED COMMENT +objectClass: top +objectClass: organization +objectClass: domainRelatedObject +objectClass: dcobject +dc: example +l: Anytown, Michigan +st: Michigan +o: Example, Inc. +o: EX +o: Ex. +description: The Example, Inc. at Anytown +postalAddress: Example, Inc. $ 535 W. William St. $ Anytown, MI 48109 $ US +telephoneNumber: +1 313 555 1817 +associatedDomain: example.com + +dn: ou=People,dc=example,dc=com +objectClass: organizationalUnit +objectClass: extensibleObject +ou: People +uidNumber: 0 +gidNumber: 0 +signed:: sm4= +number:: AA== + +dn: ou=Groups,dc=example,dc=com +objectClass: organizationalUnit +ou: Groups + +dn: ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: organizationalUnit +ou: Alumni Association + +dn: ou=Information Technology Division,ou=People,dc=example,dc=com +objectClass: organizationalUnit +ou: Information Technology Division +description:: aMODwoPDgsKCw4PCgsOCwotFVlZQw4PCg8OCwoPDg8KCw4LCv0zDg8KDw4LCgsOD + woLDgsKKT8ODwoPDgsKDw4PCgsOCwqs6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g8KCw4LCgHUow4PCg8OCwoLDg8KCw4LC + i8ODwoPDgsKDw4PCgsOCwo3Dg8KDw4LCgsODwoLDgsKJw4PCg8OCwoLDg8KCw4LCtTTDg8KDw4LCg + 8ODwoLDgsKow4PCg8OCwoPDg8KCw4LCl8ODwoPDgsKDw4PCgsOCwrtWw4PCg8OCwoLDg8KCw4LCi8 + ODwoPDgsKDw4PCgsOCwo3Dg8KDw4LCg8ODwoLDgsKow4PCg8OCwoLDg8KCw4LCnw== + +dn: cn=All Staff,ou=Groups,dc=example,dc=com +member: cn=Manager,dc=example,dc=com +member: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=exam + ple,dc=com +member: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc + =com +member: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=exa + mple,dc=com +member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=exampl + e,dc=com +owner: cn=Manager,dc=example,dc=com +cn: All Staff +description: Everyone in the sample data +objectClass: groupofnames + +dn: cn=Alumni Assoc Staff,ou=Groups,dc=example,dc=com +member: cn=Manager,dc=example,dc=com +member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com +member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com +owner: cn=Manager,dc=example,dc=com +description: All Alumni Assoc Staff +cn: Alumni Assoc Staff +objectClass: groupofnames + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example, + dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Barbara Jensen +cn: Babs Jensen +sn:: IEplbnNlbiA= +uid: bjensen +title: Mythical Manager, Research Systems +postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt + own, MI 48103-4943 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: YmplbnNlbg== +mail: bjensen@mailgw.example.com +homePostalAddress: 123 Wesley $ Anytown, MI 48103 +description: Mythical manager of the rsdd unix project +drink: water +homePhone: +1 313 555 2333 +pager: +1 313 555 3233 +facsimileTelephoneNumber: +1 313 555 2274 +telephoneNumber: +1 313 555 9022 +enumerated:: AQ== + +dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc + =com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Bjorn Jensen +cn: Biiff Jensen +sn: Jensen +uid: bjorn +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: Ympvcm4= +homePostalAddress: 19923 Seven Mile Rd. $ South Lyon, MI 49999 +drink: Iced Tea +description: Hiker, biker +title: Director, Embedded Systems +postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103 +mail: bjorn@mailgw.example.com +homePhone: +1 313 555 5444 +pager: +1 313 555 4474 +facsimileTelephoneNumber: +1 313 555 2177 +telephoneNumber: +1 313 555 0355 +enumerated:: Cw== + +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Dorothy Stevens +cn: Dot Stevens +sn: Stevens +uid: dots +title: Secretary, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +drink: Lemonade +homePostalAddress: 377 White St. Apt. 3 $ Anytown, MI 48104 +description: Very tall +facsimileTelephoneNumber: +1 313 555 3223 +telephoneNumber: +1 313 555 3664 +mail: dots@mail.alumni.example.com +homePhone: +1 313 555 0454 +enumerated:: DA== + +dn: cn=ITD Staff,ou=Groups,dc=example,dc=com +owner: cn=Manager,dc=example,dc=com +description: All ITD Staff +cn: ITD Staff +objectClass: groupofuniquenames +uniqueMember: cn=Manager,dc=example,dc=com +uniqueMember: cn=Bjorn Jensen,OU=Information Technology Division,ou=People,dc= + example,dc=com +uniqueMember: cn=James A Jones 2,ou=Information Technology Division,ou=People, + dc=example,dc=com +uniqueMember: cn=John Doe,ou=Information Technology Division,ou=People,dc=exam + ple,dc=com + +dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: James A Jones 1 +cn: James Jones +cn: Jim Jones +sn: Jones +uid: jaj +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: amFq +homePostalAddress: 3882 Beverly Rd. $ Anytown, MI 48105 +homePhone: +1 313 555 4772 +description: Outstanding +title: Mad Cow Researcher, UM Alumni Association +pager: +1 313 555 3923 +mail: jaj@mail.alumni.example.com +facsimileTelephoneNumber: +1 313 555 4332 +telephoneNumber: +1 313 555 0895 +enumerated:: DQ== + +dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example + ,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: James A Jones 2 +cn: James Jones +cn: Jim Jones +sn: Doe +uid: jjones +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 933 Brooks $ Anytown, MI 48104 +homePhone: +1 313 555 8838 +title: Senior Manager, Information Technology Division +description: Not around very much +mail: jjones@mailgw.example.com +postalAddress: Info Tech Division $ 535 W William $ Anytown, MI 48103 +pager: +1 313 555 2833 +facsimileTelephoneNumber: +1 313 555 8688 +telephoneNumber: +1 313 555 7334 +enumerated:: Dg== + +dn: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Jane Doe +cn: Jane Alverson +sn: Doe +uid: jdoe +title: Programmer Analyst, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 123 Anystreet $ Anytown, MI 48104 +drink: diet coke +description: Enthusiastic +mail: jdoe@woof.net +homePhone: +1 313 555 5445 +pager: +1 313 555 1220 +facsimileTelephoneNumber: +1 313 555 2311 +telephoneNumber: +1 313 555 4774 +enumerated:: Cg== + +dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Jennifer Smith +cn: Jen Smith +sn: Smith +uid: jen +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +drink: Sam Adams +homePostalAddress: 1000 Maple #44 $ Anytown, MI 48103 +title: Telemarketer, UM Alumni Association +mail: jen@mail.alumni.example.com +homePhone: +1 313 555 2333 +pager: +1 313 555 6442 +facsimileTelephoneNumber: +1 313 555 2756 +telephoneNumber: +1 313 555 8232 +enumerated:: ZQ== + +dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: John Doe +cn: Jonathon Doe +sn: Doe +uid: johnd +postalAddress: ITD $ 535 W. William $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 912 East Bllvd $ Anytown, MI 48104 +title: System Administrator, Information Technology Division +description: overworked! +mail: johnd@mailgw.example.com +homePhone: +1 313 555 3774 +pager: +1 313 555 6573 +facsimileTelephoneNumber: +1 313 555 4544 +telephoneNumber: +1 313 555 9394 +enumerated:: FA== + +dn: cn=Manager,dc=example,dc=com +objectClass: person +cn: Manager +cn: Directory Manager +cn: Dir Man +sn: Manager +description: Manager of the directory +userPassword:: c2VjcmV0 + +dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Mark Elliot +cn: Mark A Elliot +sn: Elliot +uid: melliot +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 199 Outer Drive $ Ypsilanti, MI 48198 +homePhone: +1 313 555 0388 +drink: Gasoline +title: Director, UM Alumni Association +mail: melliot@mail.alumni.example.com +pager: +1 313 555 7671 +facsimileTelephoneNumber: +1 313 555 7762 +telephoneNumber: +1 313 555 4177 +enumerated:: Mw== + +dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Ursula Hampster +sn: Hampster +uid: uham +title: Secretary, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 123 Anystreet $ Anytown, MI 48104 +mail: uham@mail.alumni.example.com +homePhone: +1 313 555 8421 +pager: +1 313 555 2844 +facsimileTelephoneNumber: +1 313 555 9700 +telephoneNumber: +1 313 555 5331 +enumerated:: Hw== + diff --git a/contrib/slapd-modules/datamorph/tests/data/test001-01-same-attr.ldif b/contrib/slapd-modules/datamorph/tests/data/test001-01-same-attr.ldif new file mode 100644 index 0000000..b9ba88f --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test001-01-same-attr.ldif @@ -0,0 +1,3 @@ +dn: olcDatamorphAttribute=enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnum diff --git a/contrib/slapd-modules/datamorph/tests/data/test001-02-same-index.ldif b/contrib/slapd-modules/datamorph/tests/data/test001-02-same-index.ldif new file mode 100644 index 0000000..1dac5dc --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test001-02-same-index.ldif @@ -0,0 +1,4 @@ +dn: olcDatamorphValue=nope,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 1 diff --git a/contrib/slapd-modules/datamorph/tests/data/test001-02a-same-index.ldif b/contrib/slapd-modules/datamorph/tests/data/test001-02a-same-index.ldif new file mode 100644 index 0000000..f31ab0a --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test001-02a-same-index.ldif @@ -0,0 +1,4 @@ +dn: olcDatamorphValue={0}bjensen,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 11 diff --git a/contrib/slapd-modules/datamorph/tests/data/test001-03-invalid-attr.ldif b/contrib/slapd-modules/datamorph/tests/data/test001-03-invalid-attr.ldif new file mode 100644 index 0000000..01f21c2 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test001-03-invalid-attr.ldif @@ -0,0 +1,3 @@ +dn: olcDatamorphAttribute=uid,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnum diff --git a/contrib/slapd-modules/datamorph/tests/data/test002-config.ldif b/contrib/slapd-modules/datamorph/tests/data/test002-config.ldif new file mode 100644 index 0000000..2aed906 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test002-config.ldif @@ -0,0 +1,9 @@ +dn: olcDatamorphValue=gjensen,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: add +objectclass: olcDatamorphEnumValue +olcDatamorphIndex: 55 + +dn: olcDatamorphAttribute={1}signed,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +delete: olcDatamorphIntegerUpperBound +olcDatamorphIntegerUpperBound: 30000 diff --git a/contrib/slapd-modules/datamorph/tests/data/test002-entry.ldif b/contrib/slapd-modules/datamorph/tests/data/test002-entry.ldif new file mode 100644 index 0000000..0df14c4 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test002-entry.ldif @@ -0,0 +1,31 @@ +dn: cn=Gern Jensen,ou=Information Technology Division,ou=People,dc=example,dc= + com +changetype: add +objectClass: testPerson +objectClass: transformedObject +cn: Gern Jensen +sn: Jensen +uid: gjensen +title: Chief Investigator, ITD +postalAddress: ITD $ 535 W. William St $ Anytown, MI 48103 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +drink: Coffee +homePostalAddress: 844 Brown St. Apt. 4 $ Anytown, MI 48104 +description: Very odd +facsimileTelephonenumber: +1 313 555 7557 +telephoneNumber: +1 313 555 8343 +mail: gjensen@mailgw.example.com +homePhone: +1 313 555 8844 +testTime: 20050304001801.234Z +enumerated: gjensen + +dn: ou=New Unit,dc=example,dc=com +changetype: add +objectClass: organizationalUnit +objectClass: extensibleObject +ou: New Unit +uidNumber: 32345 +gidNumber: 1 +signed: 32345 +number: 1 + diff --git a/contrib/slapd-modules/datamorph/tests/data/test002-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test002-fail.ldif new file mode 100644 index 0000000..f834997 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test002-fail.ldif @@ -0,0 +1,23 @@ +dn: uid=bjensen+cn=Barbara Jensen+enumerated=bjensen,ou=Information Technology Division,ou=People,dc=example, + dc=com +changetype: add +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Barbara Jensen +cn: Babs Jensen +sn:: IEplbnNlbiA= +uid: bjensen +title: Mythical Manager, Research Systems +postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt + own, MI 48103-4943 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: YmplbnNlbg== +mail: bjensen@mailgw.example.com +homePostalAddress: 123 Wesley $ Anytown, MI 48103 +description: Mythical manager of the rsdd unix project +drink: water +homePhone: +1 313 555 2333 +pager: +1 313 555 3233 +facsimileTelephoneNumber: +1 313 555 2274 +telephoneNumber: +1 313 555 9022 + diff --git a/contrib/slapd-modules/datamorph/tests/data/test002-transformed-rdn.ldif b/contrib/slapd-modules/datamorph/tests/data/test002-transformed-rdn.ldif new file mode 100644 index 0000000..cbcb14a --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test002-transformed-rdn.ldif @@ -0,0 +1,5 @@ +dn: ou=New Unit,dc=www+number=1,dc=example,dc=com +changetype: add +objectClass: organizationalUnit +ou: New Unit + diff --git a/contrib/slapd-modules/datamorph/tests/data/test003-config.ldif b/contrib/slapd-modules/datamorph/tests/data/test003-config.ldif new file mode 100644 index 0000000..f74717c --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test003-config.ldif @@ -0,0 +1,30 @@ +dn: olcDatamorphValue={2}dots,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 110 + +dn: olcDatamorphValue={3}jaj,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 12 + +dn: olcDatamorphValue={4}jjones,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 13 + +dn: olcDatamorphValue={2}dots,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 14 + +dn: olcDatamorphAttribute={1}signed,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIntegerSigned +olcDatamorphIntegerSigned: FALSE +- +replace: olcDatamorphIntegerUpperBound +olcDatamorphIntegerUpperBound: 50000 +- +replace: olcDatamorphIntegerLowerBound +olcDatamorphIntegerLowerBound: 50 diff --git a/contrib/slapd-modules/datamorph/tests/data/test003-out.ldif b/contrib/slapd-modules/datamorph/tests/data/test003-out.ldif new file mode 100644 index 0000000..3dbd8bc --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test003-out.ldif @@ -0,0 +1,125 @@ +# List regular entries +dn: dc=example,dc=com +objectClass: top +objectClass: organization +objectClass: domainRelatedObject +objectClass: dcobject +dc: example +l: Anytown, Michigan +st: Michigan +o: Example, Inc. +o: EX +o: Ex. +description: The Example, Inc. at Anytown +postalAddress: Example, Inc. $ 535 W. William St. $ Anytown, MI 48109 $ US +telephoneNumber: +1 313 555 1817 +associatedDomain: example.com + +dn: ou=Groups,dc=example,dc=com +objectClass: organizationalUnit +ou: Groups + + +# List entries with transformed attributes +dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: John Doe +cn: Jonathon Doe +sn: Doe +uid: johnd +postalAddress: ITD $ 535 W. William $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 912 East Bllvd $ Anytown, MI 48104 +title: System Administrator, Information Technology Division +description: overworked! +mail: johnd@mailgw.example.com +homePhone: +1 313 555 3774 +pager: +1 313 555 6573 +facsimileTelephoneNumber: +1 313 555 4544 +telephoneNumber: +1 313 555 9394 +enumerated: johnd + +dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc + =com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Bjorn Jensen +cn: Biiff Jensen +sn: Jensen +uid: bjorn +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: Ympvcm4= +homePostalAddress: 19923 Seven Mile Rd. $ South Lyon, MI 49999 +drink: Iced Tea +description: Hiker, biker +title: Director, Embedded Systems +postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103 +mail: bjorn@mailgw.example.com +homePhone: +1 313 555 5444 +pager: +1 313 555 4474 +facsimileTelephoneNumber: +1 313 555 2177 +telephoneNumber: +1 313 555 0355 +enumerated: bjorn + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example, + dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Barbara Jensen +cn: Babs Jensen +sn:: IEplbnNlbiA= +uid: bjensen +title: Mythical Manager, Research Systems +postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt + own, MI 48103-4943 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: YmplbnNlbg== +mail: bjensen@mailgw.example.com +homePostalAddress: 123 Wesley $ Anytown, MI 48103 +description: Mythical manager of the rsdd unix project +drink: water +homePhone: +1 313 555 2333 +pager: +1 313 555 3233 +facsimileTelephoneNumber: +1 313 555 2274 +telephoneNumber: +1 313 555 9022 +enumerated: bjensen + +dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example + ,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: James A Jones 2 +cn: James Jones +cn: Jim Jones +sn: Doe +uid: jjones +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 933 Brooks $ Anytown, MI 48104 +homePhone: +1 313 555 8838 +title: Senior Manager, Information Technology Division +description: Not around very much +mail: jjones@mailgw.example.com +postalAddress: Info Tech Division $ 535 W William $ Anytown, MI 48103 +pager: +1 313 555 2833 +facsimileTelephoneNumber: +1 313 555 8688 +telephoneNumber: +1 313 555 7334 +enumerated: jjones + + +# Search for transformed attributes listing only those +dn: ou=People,dc=example,dc=com +signed: -19858 + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example, + dc=com +enumerated: bjensen + + +# Search for transformed attributes after reconfiguring mapping +dn: ou=People,dc=example,dc=com +signed: 45678 + +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +enumerated: jaj + diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-01-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-01-fail.ldif new file mode 100644 index 0000000..694aacc --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-01-fail.ldif @@ -0,0 +1,5 @@ +# invalid enum value +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +changetype: modify +replace: enumerated +enumerated: 2dots diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-02-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-02-fail.ldif new file mode 100644 index 0000000..1ce687f --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-02-fail.ldif @@ -0,0 +1,5 @@ +# enums are case sensitive +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +changetype: modify +replace: enumerated +enumerated: Dots diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-03-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-03-fail.ldif new file mode 100644 index 0000000..54bb9b5 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-03-fail.ldif @@ -0,0 +1,5 @@ +# value does not exist in entry +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +changetype: modify +delete: enumerated +enumerated: uham diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-03a-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-03a-fail.ldif new file mode 100644 index 0000000..601d895 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-03a-fail.ldif @@ -0,0 +1,5 @@ +# value does not exist in entry +dn: ou=People,dc=example,dc=com +changetype: modify +delete: signed +signed: 2 diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-04-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-04-fail.ldif new file mode 100644 index 0000000..d97effc --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-04-fail.ldif @@ -0,0 +1,10 @@ +# a value outside the bounds +dn: ou=People,dc=example,dc=com +changetype: modify +replace: signed +signed: 2 +- +replace: number +number: -1 +- + diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-04a-fail.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-04a-fail.ldif new file mode 100644 index 0000000..63b3263 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-04a-fail.ldif @@ -0,0 +1,6 @@ +# a value outside the bounds +dn: ou=People,dc=example,dc=com +changetype: modify +replace: signed +signed: 32000 +- diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-changes.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-changes.ldif new file mode 100644 index 0000000..17a72da --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-changes.ldif @@ -0,0 +1,30 @@ +dn: ou=People,dc=example,dc=com +changetype: modify +replace: signed +signed: -1 +- +replace: number +number: 1 +- + +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +changetype: modify +replace: enumerated +enumerated: jaj +- + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com +changetype: modify +add: enumerated +enumerated: bjorn +enumerated: uham +- + +dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com +changetype: modify +delete: enumerated +enumerated: johnd +- +add: enumerated +enumerated: melliot +- diff --git a/contrib/slapd-modules/datamorph/tests/data/test005-out.ldif b/contrib/slapd-modules/datamorph/tests/data/test005-out.ldif new file mode 100644 index 0000000..4c8c360 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test005-out.ldif @@ -0,0 +1,212 @@ +# Test1: list entries that should have been changed by ldapmodify +dn: ou=People,dc=example,dc=com +objectClass: organizationalUnit +objectClass: extensibleObject +ou: People +uidNumber: 0 +gidNumber: 0 +signed: -1 +number: 1 + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example, + dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Barbara Jensen +cn: Babs Jensen +sn:: IEplbnNlbiA= +uid: bjensen +title: Mythical Manager, Research Systems +postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt + own, MI 48103-4943 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: YmplbnNlbg== +mail: bjensen@mailgw.example.com +homePostalAddress: 123 Wesley $ Anytown, MI 48103 +description: Mythical manager of the rsdd unix project +drink: water +homePhone: +1 313 555 2333 +pager: +1 313 555 3233 +facsimileTelephoneNumber: +1 313 555 2274 +telephoneNumber: +1 313 555 9022 +enumerated: bjensen +enumerated: bjorn +enumerated: uham + +dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc + =com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Bjorn Jensen +cn: Biiff Jensen +sn: Jensen +uid: bjorn +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: Ympvcm4= +homePostalAddress: 19923 Seven Mile Rd. $ South Lyon, MI 49999 +drink: Iced Tea +description: Hiker, biker +title: Director, Embedded Systems +postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103 +mail: bjorn@mailgw.example.com +homePhone: +1 313 555 5444 +pager: +1 313 555 4474 +facsimileTelephoneNumber: +1 313 555 2177 +telephoneNumber: +1 313 555 0355 +enumerated: bjorn + +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Dorothy Stevens +cn: Dot Stevens +sn: Stevens +uid: dots +title: Secretary, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +drink: Lemonade +homePostalAddress: 377 White St. Apt. 3 $ Anytown, MI 48104 +description: Very tall +facsimileTelephoneNumber: +1 313 555 3223 +telephoneNumber: +1 313 555 3664 +mail: dots@mail.alumni.example.com +homePhone: +1 313 555 0454 +enumerated: jaj + +dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: James A Jones 1 +cn: James Jones +cn: Jim Jones +sn: Jones +uid: jaj +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +userPassword:: amFq +homePostalAddress: 3882 Beverly Rd. $ Anytown, MI 48105 +homePhone: +1 313 555 4772 +description: Outstanding +title: Mad Cow Researcher, UM Alumni Association +pager: +1 313 555 3923 +mail: jaj@mail.alumni.example.com +facsimileTelephoneNumber: +1 313 555 4332 +telephoneNumber: +1 313 555 0895 +enumerated: jaj + +dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example + ,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: James A Jones 2 +cn: James Jones +cn: Jim Jones +sn: Doe +uid: jjones +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 933 Brooks $ Anytown, MI 48104 +homePhone: +1 313 555 8838 +title: Senior Manager, Information Technology Division +description: Not around very much +mail: jjones@mailgw.example.com +postalAddress: Info Tech Division $ 535 W William $ Anytown, MI 48103 +pager: +1 313 555 2833 +facsimileTelephoneNumber: +1 313 555 8688 +telephoneNumber: +1 313 555 7334 +enumerated: jjones + +dn: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Jane Doe +cn: Jane Alverson +sn: Doe +uid: jdoe +title: Programmer Analyst, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 123 Anystreet $ Anytown, MI 48104 +drink: diet coke +description: Enthusiastic +mail: jdoe@woof.net +homePhone: +1 313 555 5445 +pager: +1 313 555 1220 +facsimileTelephoneNumber: +1 313 555 2311 +telephoneNumber: +1 313 555 4774 +enumerated: jdoe + +dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Jennifer Smith +cn: Jen Smith +sn: Smith +uid: jen +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +drink: Sam Adams +homePostalAddress: 1000 Maple #44 $ Anytown, MI 48103 +title: Telemarketer, UM Alumni Association +mail: jen@mail.alumni.example.com +homePhone: +1 313 555 2333 +pager: +1 313 555 6442 +facsimileTelephoneNumber: +1 313 555 2756 +telephoneNumber: +1 313 555 8232 +enumerated: jen + +dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: John Doe +cn: Jonathon Doe +sn: Doe +uid: johnd +postalAddress: ITD $ 535 W. William $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 912 East Bllvd $ Anytown, MI 48104 +title: System Administrator, Information Technology Division +description: overworked! +mail: johnd@mailgw.example.com +homePhone: +1 313 555 3774 +pager: +1 313 555 6573 +facsimileTelephoneNumber: +1 313 555 4544 +telephoneNumber: +1 313 555 9394 +enumerated: melliot + +dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Mark Elliot +cn: Mark A Elliot +sn: Elliot +uid: melliot +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 199 Outer Drive $ Ypsilanti, MI 48198 +homePhone: +1 313 555 0388 +drink: Gasoline +title: Director, UM Alumni Association +mail: melliot@mail.alumni.example.com +pager: +1 313 555 7671 +facsimileTelephoneNumber: +1 313 555 7762 +telephoneNumber: +1 313 555 4177 +enumerated: melliot + +dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com +objectClass: OpenLDAPperson +objectClass: transformedObject +cn: Ursula Hampster +sn: Hampster +uid: uham +title: Secretary, UM Alumni Association +postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109 +seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com +homePostalAddress: 123 Anystreet $ Anytown, MI 48104 +mail: uham@mail.alumni.example.com +homePhone: +1 313 555 8421 +pager: +1 313 555 2844 +facsimileTelephoneNumber: +1 313 555 9700 +telephoneNumber: +1 313 555 5331 +enumerated: uham + diff --git a/contrib/slapd-modules/datamorph/tests/data/test007-config.ldif b/contrib/slapd-modules/datamorph/tests/data/test007-config.ldif new file mode 100644 index 0000000..3820831 --- /dev/null +++ b/contrib/slapd-modules/datamorph/tests/data/test007-config.ldif @@ -0,0 +1,30 @@ +dn: olcDatamorphValue={2}dots,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 110 + +dn: olcDatamorphValue={4}jjones,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 14 + +dn: olcDatamorphValue={3}jaj,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 13 + +dn: olcDatamorphValue={2}dots,olcDatamorphAttribute={0}enumerated,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIndex +olcDatamorphIndex: 12 + +dn: olcDatamorphAttribute={1}signed,olcOverlay={0}datamorph,olcDatabase={1}@BACKEND@,cn=config +changetype: modify +replace: olcDatamorphIntegerSigned +olcDatamorphIntegerSigned: TRUE +- +replace: olcDatamorphIntegerLowerBound +olcDatamorphIntegerLowerBound: -20000 +- +replace: olcDatamorphIntegerUpperBound +olcDatamorphIntegerUpperBound: 30000 |