From e990241e9988f4c8c6aba809a93b786be54c55cc Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Fri, 20 Apr 2007 21:49:22 +0000
Subject: [PATCH] Adding some assorted new syntax and format tests for ACIs.

---
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif        |   30 +++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_carlicense18.ldif |   30 +++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci14.ldif          |   31 +++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml                     |  104 +++++++++++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci15.ldif          |   31 +++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_title18.ldif      |   30 +++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml                             |   70 +++++++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml                       |  178 +++++++++++++++++++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci13.ldif                |   30 +++
 9 files changed, 532 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif
new file mode 100644
index 0000000..6c32919
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif
@@ -0,0 +1,30 @@
+# 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: ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+replace: aci
+aci: (targetattr="*")(targattrfilters="add=title:(title=Eng*)")(version 3.0; acl "add_aci18 The contents of this file are subject to the terms of the Common Development and Distribution License, Version 1.0 only. 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. See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each ile 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]"; allow (all) userdn="ldap:///all";)
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_carlicense18.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_carlicense18.ldif
new file mode 100644
index 0000000..31d0285
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_carlicense18.ldif
@@ -0,0 +1,30 @@
+# 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: uid=gfarmer,ou=People,ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: carlicense
+carlicense: ABC 123
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_title18.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_title18.ldif
new file mode 100644
index 0000000..84f48c6
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_title18.ldif
@@ -0,0 +1,30 @@
+# 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: uid=gfarmer,ou=People,ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: title
+title: Engineering Supervisor
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci13.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci13.ldif
new file mode 100644
index 0000000..920af51
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci13.ldif
@@ -0,0 +1,30 @@
+# 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: ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: aci
+aci: (target="ldap:///all")(targetattr="*")(version 3.0; acl "add_aci13"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci14.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci14.ldif
new file mode 100644
index 0000000..9cad01f
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci14.ldif
@@ -0,0 +1,31 @@
+# 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: ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+replace: aci
+aci: (targetfilter="(|(!(title=sweep*)(l=Paris*)))")(version 3.0; acl "add_aci14"; allow (all) userdn="ldap:///all";)
+
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci15.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci15.ldif
new file mode 100644
index 0000000..d3feaa8
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci15.ldif
@@ -0,0 +1,31 @@
+# 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: ou=aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+replace: aci
+aci: (targetfilter="(&(!(title=sweep*)(l=Paris*)))")(version 3.0; acl "add_aci15"; allow (all) userdn="ldap:///all";)
+
+
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml
index 8d5bf29..d1e4e08 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml
@@ -1606,7 +1606,109 @@
               </sequence>
             </testcase>
 
-         <!---
+       <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Targattrfilter Tests
+                #@TestName                  Targattrfilter with very long comment portion 
+                #@TestIssue                 437
+                #@TestPurpose               Test with the targattrfilter with very long comment portion 
+                #@TestPreamble              Admin adds an aci with the target equal to the dn of one existing branch.
+                #@TestStep                  Client adds title to an entry with the targeted branch dn.
+                #@TestStep                  Client adds prohibited title to an entry with the targeted branch dn.
+                #@TestStep                  Client deletes telephonenumber from an entry with the targeted branch dn.
+                #@TestStep                  Client adds title to an entry that is not with the targeted branch dn.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client adds carlicense to an entry with the previously targeted branch dn.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldapmodify operations, 
+                                            0 for steps 1 and 3, and
+                                            50 for all other steps.
+            -->
+            <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+            <!-- cross reference to DS6 docs -->
+           <testcase name="'ACI: Targattrfilter: Targattrfilter with very long comment portion'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = 'add_aci18.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_targattrfilter/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter with very long comment portion, preamble adding aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_targattrfilter/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter with very long comment portion, user adding title to targeted entry'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'entryToBeModified'   : '%s/aci/aci_targattrfilter/add_title18.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter with very long comment portion, admin deleting aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_targattrfilter/del_aci.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter with very long comment portion, user adding carlicense to previously targeted entry'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'entryToBeModified'   : '%s/aci/aci_targattrfilter/add_carlicense18.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <call function="'checktestRC'">
+                    { 'returncode' : RC ,
+                      'result'     : STAXResult ,
+                      'expected'   : 50 }
+                </call>
+                
+                <call function="'testCase_Postamble'"/>
+    
+              </sequence>
+            </testcase>
+     
+              <!---
                 Place test-specific test information here.
                 The tag, TestMarker, must be the same as the tag, TestSuiteName.
                 #@TestMarker                ACI Targattrfilter Tests
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml
index 110567a..f17976d 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml
@@ -1508,6 +1508,76 @@
             </sequence>
           </testcase>
    
+          <!---
+              Place test-specific test information here.
+              The tag, TestMarker, must be the same as the tag, TestSuiteName.
+              #@TestMarker                ACI Target Tests
+              #@TestName                  Target with ldap:all
+              #@TestIssue                 434
+              #@TestPurpose               Test if an aci is allowed that contains the keyword target with all
+              #@TestPreamble              none
+              #@TestStep                  Admin adds an aci to an existing entry
+                                          that has the keyword target misspelled
+              #@TestStep                  Admin checks if aci was added.
+              #@TestStep                  Client searches entry with the targeted dn.
+              #@TestStep                  Client searches entry with a non-targeted dn.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 21, 
+                                          and the aci has not been added.
+          -->
+          <testcase name="'ACI: Target: With ldap:all'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+
+              <script>
+                    curr_aci_ldif_file = 'add_aci13.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+              </script>
+        
+              <message>
+                 'ACI: Target: With ldap:all - add aci,\n %s' % curr_aci
+              </message>
+  
+              <call function="'modifyEntry'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeModified'   : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+              </call>
+  
+              <if expr="RC != 21">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Target: With ldap:all - check aci'
+              </message>
+  
+              <call function="'SearchObject'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                  'dsBaseDN'         : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
+                  'dsFilter'         : 'objectclass=*'  ,
+                  'extraParams'      : '-s base' ,
+                  'attributes'       : 'aci' }
+              </call>
+  
+              <script> 
+               returnString = STAXResult[0][1]
+              </script> 
+  
+              <call function="'checktestStringNotPresent'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'aci:' }
+              </call>
+              
+              <call function="'testCase_Postamble'"/>          
+            </sequence>
+          </testcase>
+   
         <!---
               Place test-specific test information here.
               The tag, TestMarker, must be the same as the tag, TestSuiteName.
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml
index be13a1e..238d85d 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml
@@ -3023,7 +3023,183 @@
             </sequence>
           </testcase>
   
-          <!---
+       <!---
+              Place test-specific test information here.
+              The tag, TestMarker, must be the same as the tag, TestSuiteName.
+              #@TestMarker                ACI Targetfilter Tests 
+              #@TestName                  Targetfilter with Improperly Formatted Filter with or
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with improperly formatted filter with or
+              #@TestPreamble              none
+              #@TestStep                  Admin adds an aci with the targetfilter with misplaced quotes.
+              #@TestStep                  Client searches entry which should not be allowed.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 21
+                                          and the aci was not addded.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with or'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+                          
+              <script>
+                    curr_aci_ldif_file = 'add_aci14.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_targetfilter/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+              </script>
+        
+              <message>
+                 'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with or, preamble adding aci,\n %s' % curr_aci
+              </message>
+  
+              <call function="'modifyEntry'">
+                { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeModified'   : '%s/aci/aci_targetfilter/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+              </call>
+  
+              <if expr="RC != 21">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with or, user searching targeted entry'
+              </message>
+  
+              <call function="'SearchObject'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                  'dsInstancePswd'   : 'ACIRules' ,
+                  'dsBaseDN'         : 'uid=dmiller,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
+                  'dsFilter'         : 'objectclass=*'  ,
+                  'attributes'      : 'cn sn uid roomnumber'}
+              </call>
+  
+              <script> 
+               returnString = STAXResult[0][1]
+              </script> 
+  
+              <call function="'checktestStringNotPresent'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <!-- The following operation can be removed when Issue 1531 is fixed. -->
+              <message>
+                   'ACI: Targattrfilter: Targattrfilter with mispelled del with add, admin deleting aci'
+              </message>
+    
+              <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_targetfilter/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+    
+              <call function="'checktestRC'">
+                    { 'returncode' : RC ,
+                      'result'     : STAXResult }
+              </call>
+                
+              <call function="'testCase_Postamble'"/>
+  
+            </sequence>
+          </testcase>
+  
+       <!---
+              Place test-specific test information here.
+              The tag, TestMarker, must be the same as the tag, TestSuiteName.
+              #@TestMarker                ACI Targetfilter Tests 
+              #@TestName                  Targetfilter with Improperly Formatted Filter with and
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with improperly formatted filter with and
+              #@TestPreamble              none
+              #@TestStep                  Admin adds an aci with the targetfilter with misplaced quotes.
+              #@TestStep                  Client searches entry which should not be allowed.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 21
+                                          and the aci was not addded.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with and'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+                          
+              <script>
+                    curr_aci_ldif_file = 'add_aci15.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_targetfilter/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+              </script>
+        
+              <message>
+                 'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with and, preamble adding aci,\n %s' % curr_aci
+              </message>
+  
+              <call function="'modifyEntry'">
+                { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeModified'   : '%s/aci/aci_targetfilter/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+              </call>
+  
+              <if expr="RC != 21">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter With Improperly Formatted Filter with and, user searching targeted entry'
+              </message>
+  
+              <call function="'SearchObject'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                  'dsInstancePswd'   : 'ACIRules' ,
+                  'dsBaseDN'         : 'uid=dmiller,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
+                  'dsFilter'         : 'objectclass=*'  ,
+                  'attributes'      : 'cn sn uid roomnumber'}
+              </call>
+  
+              <script> 
+               returnString = STAXResult[0][1]
+              </script> 
+  
+              <call function="'checktestStringNotPresent'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <!-- The following operation can be removed when Issue 1531 is fixed. -->
+              <message>
+                   'ACI: Targattrfilter: Targattrfilter with mispelled del with add, admin deleting aci'
+              </message>
+    
+              <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_targetfilter/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+    
+              <call function="'checktestRC'">
+                    { 'returncode' : RC ,
+                      'result'     : STAXResult }
+              </call>
+                
+              <call function="'testCase_Postamble'"/>
+  
+              <call function="'testCase_Postamble'"/>
+  
+            </sequence>
+          </testcase>
+  
+           <!---
               Place test-specific test information here.
               The tag, TestMarker, must be the same as the tag, TestSuiteName.
               #@TestMarker                ACI Targetfilter Tests 

--
Gitblit v1.10.0