From d80497bde3083d4a68d3d62c45cf60827635bc3d Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Mon, 09 Apr 2007 15:24:03 +0000
Subject: [PATCH] Added some stray ACI functional tests for the syntax and basic functionality for target, targetattr, and targattrfilters.

---
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetattr/add_aci10.ldif             |   30 ++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targattrfilter.xml                      |  270 ++++++++++++++++++++++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci17.ldif         |   30 ++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_target.xml                              |   71 +++++
 opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetattr.xml                          |  143 +++++++++++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_mail17.ldif    |   30 ++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17.ldif  |   30 ++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17a.ldif |   30 ++
 opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci12.ldif                 |   30 ++
 9 files changed, 662 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci17.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci17.ldif
new file mode 100644
index 0000000..9f2c1b1
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci17.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="street")(targattrfilters="add=street:(street=*),del=street:(street=*)")(version 3.0; acl "add_aci17"; allow (all) userdn="ldap:///all";)
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_mail17.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_mail17.ldif
new file mode 100644
index 0000000..5c1de2c
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_mail17.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
+replace: mail
+mail: gfarmer@newmail.example.com
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17.ldif
new file mode 100644
index 0000000..37c8c43
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17.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
+replace: street
+street: Washington St
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17a.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17a.ldif
new file mode 100644
index 0000000..87c5251
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targattrfilter/replace_street17a.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=non-aci branch, o=ACI Tests, dc=example,dc=com
+changetype: modify
+replace: street
+street: Washington
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci12.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/add_aci12.ldif
new file mode 100644
index 0000000..4540c90
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_target/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="ou=aci branch, o=ACI Tests, dc=example,dc=com")(targetattr="*")(version 3.0; acl "add_aci12"; allow (search,read) userdn="ldap:///all";)
+
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetattr/add_aci10.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetattr/add_aci10.ldif
new file mode 100644
index 0000000..ae11822
--- /dev/null
+++ b/opendj-sdk/opends/tests/functional-tests/shared/data/aci/aci_targetattr/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!="*")(version 3.0; acl "add_aci10"; allow (search,read) 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 9f8a348..45c1c38 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
@@ -718,7 +718,7 @@
                 Place test-specific test information here.
                 The tag, TestMarker, must be the same as the tag, TestSuiteName.
                 #@TestMarker                ACI Targattrfilter Tests
-                #@TestName                  Targattrfilter equals add:l,del:l  blah blah
+                #@TestName                  Targattrfilter equals add:l,del:l
                 #@TestIssue                 437
                 #@TestPurpose               Test with the targattrfilter set equal to add:l,del:l
                 #@TestPreamble              Admin adds an aci with the target equal to the dn of one existing branch.
@@ -848,6 +848,139 @@
               </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 equals add:street,del:street, street not present  
+                #@TestIssue                 437
+                #@TestPurpose               Test with the targattrfilter set equal to add:street,del:street
+                #@TestPreamble              Admin adds an aci with the target equal to the dn of one existing branch.
+                #@TestStep                  Client replaces st in an entry with the targeted branch dn.
+                #@TestStep                  Client replaces mail in an entry with the targeted branch dn.
+                #@TestStep                  Client replaces st in an entry that is not with the targeted branch dn.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client replaces st from an entry with the previously targeted branch dn.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldapmodify operations, 
+                                            0 for step 1, 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 equals add:street,del:street wildcard only, street not present'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = '%s/aci/aci_targattrfilter/add_aci17.ldif' % LOCAL_DATA_DIR
+                    curr_aci=retrieve_aci('%s' % curr_aci_ldif_file);
+                </script>
+        
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, 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' % curr_aci_ldif_file }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing street in 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/replace_street17.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing mail in 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/replace_mail17.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing street in non-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/replace_street17a.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, 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 equals add:street,del:street wildcard only, street not present, user replacing street in 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/replace_street17.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.
@@ -1472,7 +1605,140 @@
     
               </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 equals add:street,del:street, street not present  
+                #@TestIssue                 437
+                #@TestPurpose               Test with the targattrfilter set equal to add:street,del:street
+                #@TestPreamble              Admin adds an aci with the target equal to the dn of one existing branch.
+                #@TestStep                  Client replaces st in an entry with the targeted branch dn.
+                #@TestStep                  Client replaces mail in an entry with the targeted branch dn.
+                #@TestStep                  Client replaces st in an entry that is not with the targeted branch dn.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client replaces st from an entry with the previously targeted branch dn.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldapmodify operations, 
+                                            0 for step 1, 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 equals add:street,del:street wildcard only, street not present'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = '%s/aci/aci_targattrfilter/add_aci17.ldif' % LOCAL_DATA_DIR
+                    curr_aci=retrieve_aci('%s' % curr_aci_ldif_file);
+                </script>
+        
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, 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' % curr_aci_ldif_file }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing street in 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/replace_street17.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing mail in 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/replace_mail17.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, user replacing street in non-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/replace_street17a.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Targattrfilter: Targattrfilter equals add:street,del:street wildcard only, street not present, 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 equals add:street,del:street wildcard only, street not present, user replacing street in 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/replace_street17.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.
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 71cb294..2289290 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
@@ -1437,6 +1437,77 @@
             </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 missing leading ldap:
+              #@TestIssue                 434
+              #@TestPurpose               Test if an aci is allowed that contains the keyword target misspelled
+              #@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.
+          -->
+          <!-- cross reference to syntax.ksh Test Case 13 -->
+          <testcase name="'ACI: Target: Missing Leading ldap:'">
+            <sequence>
+              <call function="'testCase_Preamble'"/>
+
+              <script>
+                    curr_aci_ldif_file = '%s/aci/aci_target/add_aci12.ldif' % LOCAL_DATA_DIR
+                    curr_aci=retrieve_aci('%s' % curr_aci_ldif_file);
+              </script>
+        
+              <message>
+                 'ACI: Target: Missing leading ldap: - 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' % curr_aci_ldif_file }
+              </call>
+  
+              <if expr="RC != 21">
+                  <tcstatus result="'fail'"/>
+              </if>
+  
+              <message>
+                 'ACI: Target: Missing leading ldap: - 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_targetattr.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetattr.xml
index 4026214..99faa85 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetattr.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci_targetattr.xml
@@ -1326,6 +1326,149 @@
   
             </sequence>
           </testcase>
+
+            <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Targetattr Tests
+                #@TestName                  Targetattr not equals wildcard 
+                #@TestIssue                 434
+                #@TestPurpose               Test with the targetattr not equal to wildcard
+                #@TestPreamble              Admin adds an aci with the target equal to the dn of one existing branch.
+                #@TestStep                  Client searches entry with the targeted branch dn.
+                #@TestStep                  Client searches entry that is not with the targeted branch dn.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client searches entry with the previously targeted branch dn.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldap operations, and
+                                            and no entries are returned for any ldapsearch step.
+            -->
+          <!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
+          <!-- cross reference to DS6 docs -->
+            <testcase name="'ACI: Target: Targetattr Not Equals Wildcard'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = '%s/aci/aci_targetattr/add_aci10.ldif' % LOCAL_DATA_DIR
+                    curr_aci=retrieve_aci('%s' % curr_aci_ldif_file);
+                </script>
+        
+                <message>
+                   'ACI: Target: Targetattr Not Equals Wildcard, 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' % curr_aci_ldif_file }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Target: Targetattr Not Equals Wildcard, 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=tmorris,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'      : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=tmorris,ou=People,ou=aci branch,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '0'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Target: Targetattr Not Equals Wildcard, 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=tmorris,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=tmorris,ou=People,ou=aci branch,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '0'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Target: Targetattr Not Equals Wildcard, 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: Target: Targetattr Not Equals Wildcard, 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=tmorris,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'      : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'checktestStringNotPresent'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=tmorris,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.

--
Gitblit v1.10.0