From 8aaa16f43f88550cbe7a8a2ddad12a917e845488 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 05 Jul 2007 05:56:48 +0000
Subject: [PATCH] Update the server processing for the LDAP no-op control so that it uses a nonzero result code.  For now, we're using a result code of 16654 (0x410e, which is what OpenLDAP uses).  If a new specification is released with an official OID and result code, then we'll use them.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPPasswordModifyTestCase.java |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPPasswordModifyTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPPasswordModifyTestCase.java
index 9bc8f03..bc84b18 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPPasswordModifyTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPPasswordModifyTestCase.java
@@ -40,6 +40,7 @@
 import org.opends.server.core.AddOperation;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.protocols.internal.InternalClientConnection;
+import org.opends.server.protocols.ldap.LDAPResultCode;
 import org.opends.server.types.Entry;
 import org.opends.server.types.ResultCode;
 
@@ -974,7 +975,7 @@
    * @throws  Exception  If an unexpected problem occurs.
    */
   @Test()
-  public void testLDAPNoOpUnsupportedCriticalControl()
+  public void testUnsupportedCriticalControl()
          throws Exception
   {
     TestCaseUtils.initializeTestBackend(true);
@@ -1023,9 +1024,8 @@
       "-J", OID_LDAP_NOOP_OPENLDAP_ASSIGNED + ":true"
     };
 
-    // FIXME -- Change this whenever the real LDAP No-Op result code is assigned
     assertEquals(LDAPPasswordModify.mainPasswordModify(args, false, null, null),
-                 0);
+                 LDAPResultCode.NO_OPERATION);
   }
 
 
@@ -1055,9 +1055,8 @@
       "-J", "noop:true"
     };
 
-    // FIXME -- Change this whenever the real LDAP No-Op result code is assigned
     assertEquals(LDAPPasswordModify.mainPasswordModify(args, false, null, null),
-                 0);
+                 LDAPResultCode.NO_OPERATION);
   }
 
 
@@ -1088,9 +1087,8 @@
       "-J", OID_PASSWORD_POLICY_CONTROL + ":true"
     };
 
-    // FIXME -- Change this whenever the real LDAP No-Op result code is assigned
     assertEquals(LDAPPasswordModify.mainPasswordModify(args, false, null, null),
-                 0);
+                 LDAPResultCode.NO_OPERATION);
   }
 
 

--
Gitblit v1.10.0