Issue Details (XML | Word | Printable)

Key: DIRSERVER-392
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Karasulu
Reporter: Stefan Zoerner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Modify operation (removal) provides wrong return codes in two situations.

Created: 27/Aug/05 12:02 AM   Updated: 10/Feb/06 12:34 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File ModifyRemoveTest.java 2005-08-27 01:07 AM Stefan Zoerner 9 kB
Issue Links:
Reference
 

Resolution Date: 29/Aug/05 02:08 PM


 Description  « Hide
The modify operation provides wrong return codes in two cases:

1. Removal of an attribute which does not occur in the entry (expected result is error code 16: noSuchAttribute)
2. Removal of an invalid attribute, i.e. not existing within the schema (expected result is error code 17: undefinedAttributeType)

This is quite similar to DIREVE-226.

I attach a subclass of AbstractServerTest which contains several test methods for basic removal ops. Due to the recent changes regarding schema checks, most of them succeed. Two tests check for the return codes above (and fail). It includes also a test which deletes a required attribute (not part of RDN), which fails -- but this is expected due to the current development progress.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #264063 Mon Aug 29 05:07:15 UTC 2005 akarasulu Added some schema checks to prevent improper modify operations from succeeding.
Namely we added checks to satisfy the modify tests submitted by Stefan in the
following JIRA DIREVE-232 issue:

http://issues.apache.org/jira/browse/DIREVE-232

His test case was added as well as the changes to make sure the tests pass.

NOTE: most of these fixes testing for schema correctness should be moved into
the schema checking interceptor however there may be some information loss
without access to the request - this should be inspected before moving this
code into the interceptor.
Files Changed
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ModifyHandler.java
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/CompareHandler.java
ADD /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/ModifyRemoveTest.java