From b1b08f283535869a4e757d3cf939d3206ad0a187 Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Mon, 04 Jun 2007 15:40:25 +0000
Subject: [PATCH] Leftover cleanup items on the functional test case related to Issue 1610.

---
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_proxy_auth.xml                      |   27 ++++++++++++++++++++++-----
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_proxy_auth/del_proxy_auth_dm.ldif |   29 +++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_proxy_auth/del_proxy_auth_dm.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_proxy_auth/del_proxy_auth_dm.ldif
new file mode 100644
index 0000000..c915bf1
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_proxy_auth/del_proxy_auth_dm.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Directory Manager,cn=Root DNs,cn=config
+changetype: modify
+delete: ds-privilege-name
+
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_proxy_auth.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_proxy_auth.xml
index 3b1d942..087fac3 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_proxy_auth.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_proxy_auth.xml
@@ -2267,12 +2267,13 @@
               #@TestStep                  Admin adds ds-privilege-name to cn=Directory Manager
               #@TestStep                  Client searches entry in targeted branch as cn=Directory Manager proxied user.
               #@TestStep                  Client searches entry in targeted branch as cn=Directory Manager proxied user through second user.
+              #@TestStep                  Admin deletes ds-privilege-name from cn=Directory Manager
               #@TestStep                  Remove all acis.
               #@TestStep                  Client searches entry in the previously targeted branch.
               #@TestPostamble             none
               #@TestResult                Success if OpenDS returns 0
                                           for all ldap operations except step 3 where 123 is expected. 
-                                          Entry is returned only for steps 1, 5 and 6
+                                          Entry is returned only for steps 1 and 5
                                           and only with the specified attribute.
           -->
           <testcase name="'ACI: Proxy Auth: Directory Manager as proxy'">
@@ -2406,7 +2407,7 @@
               <if expr="RC != 0">
                   <tcstatus result="'fail'"/>
               </if>
-<!--   Uncomment or delete when Issue 1610 is remedied.
+
               <script>
                   curr_aci_ldif_file = 'add_proxy_aci_dm.ldif'
                   curr_aci=retrieve_aci('%s/aci/aci_proxy_auth/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
@@ -2427,7 +2428,7 @@
               <if expr="RC != 0">
                   <tcstatus result="'fail'"/>
               </if>
--->  
+  
               <message>
                  'ACI: Proxy Auth: Directory Manager as proxy, proxied user searching targeted entry'
               </message>
@@ -2489,7 +2490,7 @@
                     'testString'         : 'dn: uid=tmorris,ou=People,ou=aci branch,o=ACI Tests' }
               </call>
               
-              <if expr="returnCode != '1'">
+              <if expr="returnCode != '0'">
                   <tcstatus result="'fail'"/>
               </if>
   
@@ -2498,11 +2499,27 @@
                     'testString'         : 'cn:' }
               </call>
               
-              <if expr="returnCode != '1'">
+              <if expr="returnCode != '0'">
                   <tcstatus result="'fail'"/>
               </if>
   
               <message>
+                 'ACI: Proxy Auth: Directory Manager as proxy, deleting proxied-auth'
+              </message>
+  
+              <call function="'modifyEntry'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeModified'   : '%s/aci/aci_proxy_auth/del_proxy_auth_dm.ldif' % (STAGED_DATA_DIR) }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+
+              <message>
                  'ACI: Proxy Auth: Directory Manager as proxy, admin deleting both acis'
               </message>
   

--
Gitblit v1.10.0