| | |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.SearchScope; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.DITContentRule; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRuleUse; |
| | | import org.forgerock.opendj.ldap.schema.ObjectClass; |
| | |
| | | import org.opends.server.protocols.internal.SearchRequest; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.tools.LDAPModify; |
| | | import org.opends.server.types.DITContentRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | "NAME 'testAddDITContentRuleUndefinedOC' NOT description " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleAuxiliaryOC' NOT description " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleUndefinedAuxOC' " + |
| | | "AUX xxxundefinedxxx X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "AUX ( posixAccount $ xxxundefinedxxx ) " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleAuxOCNotAuxOC' " + |
| | | "AUX person X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "AUX ( posixAccount $ person ) " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleUndefinedReqAT' " + |
| | | "MUST xxxundefinedxxx X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "MUST ( cn $ xxxundefinedxxx ) " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleUndefinedOptAT' " + |
| | | "MAY xxxundefinedxxx X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "MAY ( cn $ xxxundefinedxxx ) " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDITContentRuleUndefinedNotAT' " + |
| | | "NOT xxxundefinedxxx X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NOT ( description $ xxxundefinedxxx ) " + |
| | | "X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDCRProhibitReqStructuralAT' " + |
| | | "NOT cn X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |
| | |
| | | "NAME 'testAddDCRProhibitReqAuxiliaryAT' AUX posixAccount " + |
| | | "NOT uid X-ORIGIN 'SchemaBackendTestCase' )"); |
| | | |
| | | runModify(argsNotPermissive(), ldif, INVALID_ATTRIBUTE_SYNTAX); |
| | | runModify(argsNotPermissive(), ldif, CONSTRAINT_VIOLATION); |
| | | } |
| | | |
| | | /** |