From 1b26fd3f96d2327c8d4bc29292ca3c96e88f155a Mon Sep 17 00:00:00 2001
From: el_kaboing <el_kaboing@localhost>
Date: Wed, 21 Mar 2007 17:55:26 +0000
Subject: [PATCH] Adding the rest of the functional test cases for the keyword, targetfilter, for Issue 436.

---
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci6a.ldif |   30 +
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci10.ldif |   30 +
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci11.ldif |   30 +
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci13.ldif |   30 +
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci3a.ldif |   30 +
 opends/tests/functional-tests/testcases/aci/aci_targetfilter_syntax.xml       | 1156 ++++++++++++++++++++++++++++++++++++++++++++++++++
 opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci12.ldif |   30 +
 7 files changed, 1,333 insertions(+), 3 deletions(-)

diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci10.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci10.ldif
new file mode 100644
index 0000000..c42e06c
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci10.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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter="(|(cn=*bad)(sn=*bad)(roomnumber=*135))")(version 3.0; acl "add_aci10"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci11.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci11.ldif
new file mode 100644
index 0000000..077eb99
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci11.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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter="(|(cn=*bad)(sn=*bad)(roomnumber=*1*5))")(version 3.0; acl "add_aci10"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci12.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci12.ldif
new file mode 100644
index 0000000..21b5801
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci12.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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter="(&(cn=David Miller)(sn=Miller)(roomnumber=*135))")(version 3.0; acl "add_aci12"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci13.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci13.ldif
new file mode 100644
index 0000000..2af70bd
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter="(&(cn=David Miller)(sn=Mille*)(roomnumber=*1*5))")(version 3.0; acl "add_aci13"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci3a.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci3a.ldif
new file mode 100644
index 0000000..65d4f2a
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci3a.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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter!="(|(cn=bad)(sn=bad)(roomnumber=4135))")(version 3.0; acl "add_aci3a"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci6a.ldif b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci6a.ldif
new file mode 100644
index 0000000..20e9bed
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_targetfilter/add_aci6a.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:///ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(targetfilter!="(&(cn=David Miller)(sn=Miller)(roomnumber=4135))")(version 3.0; acl "add_aci6a"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opends/tests/functional-tests/testcases/aci/aci_targetfilter_syntax.xml b/opends/tests/functional-tests/testcases/aci/aci_targetfilter_syntax.xml
index 07b5a64..952cd2c 100755
--- a/opends/tests/functional-tests/testcases/aci/aci_targetfilter_syntax.xml
+++ b/opends/tests/functional-tests/testcases/aci/aci_targetfilter_syntax.xml
@@ -48,7 +48,7 @@
                 #@TestSuiteName             ACI Targetfilter Tests - syntax
                 #@TestSuitePurpose          Test the basic ACI Targetfilter Support. (allow(read))
                 #@TestSuiteGroup            Basic ACI Targetfilter Tests allow(read)
-                #@TestScript                aci_targetfilter.xml
+                #@TestScript                aci_targetfilter_syntax.xml
           -->
       
           <!---
@@ -1054,6 +1054,198 @@
             </sequence>
           </testcase>
         
+        <!---
+              Place test-specific test information here.
+              The tag, TestMarker, must be the same as the tag, TestSuiteName.
+              #@TestMarker                ACI Targetfilter Tests - syntax
+              #@TestName                  Targetfilter (not equals) with three statements with or, one statement true
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with not equals three statements with or and one statement is true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with or.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 2 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, preamble adding 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/add_aci3a.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With or, one true, user searching previously 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=scarter,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=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <call function="'testCase_Postamble'"/>
+  
+            </sequence>
+          </testcase>
+        
        <!---
               Place test-specific test information here.
               The tag, TestMarker, must be the same as the tag, TestSuiteName.
@@ -1327,8 +1519,6 @@
             </sequence>
           </testcase>
         
-        
-        
        <!---
               Place test-specific test information here.
               The tag, TestMarker, must be the same as the tag, TestSuiteName.
@@ -1525,6 +1715,966 @@
               Place test-specific test information here.
               The tag, TestMarker, must be the same as the tag, TestSuiteName.
               #@TestMarker                ACI Targetfilter Tests - syntax
+              #@TestName                  Targetfilter (not equals) with three statements with and, all statements true 
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with not equals three statements with and and all statements are true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with and.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 2 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, preamble adding 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/add_aci6a.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Not Equals Three Statements With and, all true, user searching previously 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=scarter,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=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </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 - syntax
+              #@TestName                  Targetfilter with three statements with wildcard and or, one statement true
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with three statements with wildcard and or and one statement is true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with wildcard and or.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 1 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, preamble adding 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/add_aci10.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard and or, one true, user searching previously 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>
+              
+              <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 - syntax
+              #@TestName                  Targetfilter with three statements with two wildcards and or, one statement true
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with three statements with two wildcards and or and one statement is true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with wildcard and or.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 1 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, preamble adding 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/add_aci11.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Two Wildcards and or, one true, user searching previously 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>
+              
+              <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 - syntax
+              #@TestName                  Targetfilter with three statements with wildcard and and, all statements true
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with three statements with wildcard with and and all statements true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with wildcard with and.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 1 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, preamble adding 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/add_aci12.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Wildcard With and, all true, user searching previously 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>
+              
+              <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 - syntax
+              #@TestName                  Targetfilter with three statements with three wildcards and and, all statements true
+              #@TestIssue                 436
+              #@TestPurpose               Test with a targetfilter with three statements with three wildcards with and and all statements true
+              #@TestPreamble              Admin adds an aci with the targetfilter containing three statements with three wildcards with and.
+              #@TestStep                  Client searches entry which should be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which should not be allowed with the targetfilter.
+              #@TestStep                  Client searches entry which is outside of the scope of the aci.
+              #@TestStep                  Remove aci.
+              #@TestStep                  Client searches entry which was previously allowed with the targetfilter.
+              #@TestPostamble             none
+              #@TestResult                Success if OpenDS returns 0
+                                          for all ldap operations. 
+                                          Entry is returned only for step 1 
+                                          and only with the appropriate attributes.
+          -->
+        <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+        <!-- cross reference to DS6 docs -->
+          <testcase name="'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, preamble adding 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/add_aci13.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, 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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'roomnumber:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'cn:' }
+              </call>
+              
+              <if expr="returnCode != '1'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <call function="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'telephonenumber:' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, user searching non-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=scarter,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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, user searching non-targeted entry outside of the scope of the aci'
+              </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=non-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="'searchStringForSubstring'">
+                  { 'returnString'       : returnString ,
+                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
+              </call>
+              
+              <if expr="returnCode != '0'">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, 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_target/del_aci.ldif' % STAGED_DATA_DIR }
+              </call>
+  
+              <if expr="RC != 0">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Targetfilter: Targetfilter Equals Three Statements With Three Wildcards With and, all true, user searching previously 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>
+              
+              <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 - syntax
               #@TestName                  Targetfilter with extra spaces 
               #@TestIssue                 436
               #@TestPurpose               Test with a targetfilter with extra spaces

--
Gitblit v1.10.0