mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Christophe Sovant
17.41.2008 f3d2d019eaa86388a07ea98f5f780e931360a654
Add testsuite for ldif-diff and ldifmodify tools
9 files added
1 files modified
50858 ■■■■■ changed files
opends/tests/functional-tests/shared/data/clu/ldif-diff.ref 111 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldif-diff_checkbehavior.ldif 25002 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldif-diff_singlevalue.ref 125 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldifmodify.ref 25005 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldifmodify_checkbehavior.ldif 35 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldifmodify_concurrente.ldif 54 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldifmodify_moddn.ldif 26 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu.xml 2 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu_ldif-diff_checkbehavior.xml 245 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu_ldifmodify_checkbehavior.xml 253 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/clu/ldif-diff.ref
New file
@@ -0,0 +1,111 @@
dn: uid=user.10,ou=ldapdelete,o=clu tests,dc=example,dc=com
changetype: add
objectClass: person
objectClass: organizationalperson
objectClass: top
objectClass: inetorgperson
initials: BAB
pager: +1 466 230 1383
postalAddress: Bree Bjorklund$00450 Fifteenth Street$Colorado Springs, CT  76102
sn: Bjorklund
mobile: +1 265 998 9902
uid: user.10
postalCode: 76102
userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
givenName: Bree
mail: user.10@example.com
homePhone: +1 473 051 7933
street: 00450 Fifteenth Street
cn: Bree Bjorklund
st: CT
employeeNumber: 10
telephoneNumber: +1 016 571 7798
description: This is the description for Bree Bjorklund.
l: Colorado Springs
dn: uid=user.9,ou=ldappasswordmodify,o=clu tests,dc=example,dc=com
changetype: delete
# objectClass: person
# objectClass: organizationalperson
# objectClass: top
# objectClass: inetorgperson
# initials: AMA
# pager: +1 091 356 2843
# postalAddress: Abbe Abbate$76410 Sixth Street$Lafayette, IA  06698
# sn: Abbate
# mobile: +1 258 453 7401
# uid: user.9
# postalCode: 06698
# userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
# givenName: Abbe
# mail: user.9@example.com
# homePhone: +1 257 002 0605
# street: 76410 Sixth Street
# cn: Abbe Abbate
# st: IA
# employeeNumber: 9
# telephoneNumber: +1 712 054 8412
# description: This is the description for Abbe Abbate.
# l: Lafayette
dn: uid=user.10,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: employeeNumber
employeeNumber: 10
-
add: employeeNumber
employeeNumber: 100
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: mobile
mobile: +1 863 963 6402
-
add: mobile
mobile: +1 863 963 7000
-
delete: postalCode
postalCode: 07852
-
add: postalCode
postalCode: 70000
-
delete: mail
mail: user.3@example.com
-
add: mail
mail: user.70@example.com
dn: uid=user.506,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: delete
# objectClass: person
# objectClass: organizationalperson
# objectClass: top
# objectClass: inetorgperson
# initials: AIB
# pager: +1 551 774 6808
# postalAddress: Apollo Baddeley$83045 Valley Street$Cedar Rapids, NY  07959
# sn: Baddeley
# mobile: +1 684 547 8803
# uid: user.506
# postalCode: 07959
# userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
# givenName: Apollo
# mail: user.506@example.com
# homePhone: +1 400 149 3400
# street: 83045 Valley Street
# cn: Apollo Baddeley
# st: NY
# employeeNumber: 506
# telephoneNumber: +1 770 103 3141
# description: This is the description for Apollo Baddeley.
# l: Cedar Rapids
dn: uid=user.762,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: myattribute1
myattribute1: value1
-
add: myattribute2
myattribute2: value2
opends/tests/functional-tests/shared/data/clu/ldif-diff_checkbehavior.ldif
New file
Diff too large
opends/tests/functional-tests/shared/data/clu/ldif-diff_singlevalue.ref
New file
@@ -0,0 +1,125 @@
dn: uid=user.10,ou=ldapdelete,o=clu tests,dc=example,dc=com
changetype: add
objectClass: person
objectClass: organizationalperson
objectClass: top
objectClass: inetorgperson
initials: BAB
pager: +1 466 230 1383
postalAddress: Bree Bjorklund$00450 Fifteenth Street$Colorado Springs, CT  76102
sn: Bjorklund
mobile: +1 265 998 9902
uid: user.10
postalCode: 76102
userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
givenName: Bree
mail: user.10@example.com
homePhone: +1 473 051 7933
street: 00450 Fifteenth Street
cn: Bree Bjorklund
st: CT
employeeNumber: 10
telephoneNumber: +1 016 571 7798
description: This is the description for Bree Bjorklund.
l: Colorado Springs
dn: uid=user.9,ou=ldappasswordmodify,o=clu tests,dc=example,dc=com
changetype: delete
# objectClass: person
# objectClass: organizationalperson
# objectClass: top
# objectClass: inetorgperson
# initials: AMA
# pager: +1 091 356 2843
# postalAddress: Abbe Abbate$76410 Sixth Street$Lafayette, IA  06698
# sn: Abbate
# mobile: +1 258 453 7401
# uid: user.9
# postalCode: 06698
# userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
# givenName: Abbe
# mail: user.9@example.com
# homePhone: +1 257 002 0605
# street: 76410 Sixth Street
# cn: Abbe Abbate
# st: IA
# employeeNumber: 9
# telephoneNumber: +1 712 054 8412
# description: This is the description for Abbe Abbate.
# l: Lafayette
dn: uid=user.10,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: employeeNumber
employeeNumber: 10
dn: uid=user.10,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: employeeNumber
employeeNumber: 100
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: mobile
mobile: +1 863 963 6402
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: mobile
mobile: +1 863 963 7000
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: postalCode
postalCode: 07852
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: postalCode
postalCode: 70000
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
delete: mail
mail: user.3@example.com
dn: uid=user.3,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: mail
mail: user.70@example.com
dn: uid=user.506,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: delete
# objectClass: person
# objectClass: organizationalperson
# objectClass: top
# objectClass: inetorgperson
# initials: AIB
# pager: +1 551 774 6808
# postalAddress: Apollo Baddeley$83045 Valley Street$Cedar Rapids, NY  07959
# sn: Baddeley
# mobile: +1 684 547 8803
# uid: user.506
# postalCode: 07959
# userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
# givenName: Apollo
# mail: user.506@example.com
# homePhone: +1 400 149 3400
# street: 83045 Valley Street
# cn: Apollo Baddeley
# st: NY
# employeeNumber: 506
# telephoneNumber: +1 770 103 3141
# description: This is the description for Apollo Baddeley.
# l: Cedar Rapids
dn: uid=user.762,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: myattribute1
myattribute1: value1
dn: uid=user.762,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
add: myattribute2
myattribute2: value2
opends/tests/functional-tests/shared/data/clu/ldifmodify.ref
New file
Diff too large
opends/tests/functional-tests/shared/data/clu/ldifmodify_checkbehavior.ldif
New file
@@ -0,0 +1,35 @@
# 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
#
#      Copyright 2007-2008 Sun Microsystems, Inc.
#
dn: uid=user.1,ou=ldapmodify,o=clu tests,dc=example,dc=com
changetype: modify
replace: postalCode
postalCode: 50000
dn: ou=ldifmodify,o=clu tests,dc=example,dc=com
changetype: add
objectClass: top
objectClass: organizationalunit
ou: ldifmodify
dn: uid=user.0,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: delete
opends/tests/functional-tests/shared/data/clu/ldifmodify_concurrente.ldif
New file
@@ -0,0 +1,54 @@
# 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
#
#      Copyright 2007-2008 Sun Microsystems, Inc.
#
dn: uid=user.2000,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalperson
objectClass: inetorgperson
givenName: Aarika
sn: Atpco
cn: Aarika Atpco
initials: AQA
employeeNumber: 2
uid: user.2
mail: user.2@example.com
userPassword: {SSHA}LrBv0i/fIEMDnvrCRXuZuRn5nNLdTKeQc1jBKw==
telephoneNumber: +1 240 116 1006
homePhone: +1 524 998 9690
pager: +1 808 020 8342
mobile: +1 885 252 0855
street: 64447 Spruce Street
l: Providence
st: WA
postalCode: 89035
postalAddress: Aarika Atpco$64447 Spruce Street$Providence, WA  89035
description: This is the description for Aarika Atpco.
dn: uid=user.2000,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: delete
dn: uid=user.2000,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: modify
replace: postalCode
postalCode: 50000
opends/tests/functional-tests/shared/data/clu/ldifmodify_moddn.ldif
New file
@@ -0,0 +1,26 @@
# 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
#
#      Copyright 2007-2008 Sun Microsystems, Inc.
#
dn: uid=user.0,ou=ldapsearch,o=clu tests,dc=example,dc=com
changetype: moddn
newrdn: uid=user.4000
deleteoldrdn: 1
opends/tests/functional-tests/testcases/clu/clu.xml
@@ -75,6 +75,8 @@
            testList.append(['.','clu_list-backends_checkbehavior'])
            testList.append(['.','clu_manage-tasks_checkbehavior'])
            testList.append(['.','clu_dbtest_checkbehavior'])
            testList.append(['.','clu_ldifmodify_checkbehavior'])
            testList.append(['.','clu_ldif-diff_checkbehavior'])
            testList.append(['.','clu_cleanup'])
          </script>
          
opends/tests/functional-tests/testcases/clu/clu_ldif-diff_checkbehavior.xml
New file
@@ -0,0 +1,245 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
<!--
 ! 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, exclude this CDDL HEADER in each
 ! file and exclude 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
 !
 !      Copyright 2008 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="clu_ldif-diff_checkbehavior"/>
  <function name="clu_ldif-diff_checkbehavior">
    <sequence>
      <block name="'clu_ldif-diff_checkbehavior'">
        <sequence>
          <!--- Test Suite information
            #@TestSuiteName     ldif-diff check behavior tests
            #@TestSuitePurpose  Test the results of the ldif-diff command.
            #@TestSuiteGroup    ldif-diff check behavior tests
            #@TestScript        clu_ldif-diff_checkbehavior.xml
          -->
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group'] = 'clu'
            CurrentTestPath['suite'] = STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <!--- Define default value for sourceldif -->
          <script>
            sourceldif = '%s/clu/clu_start.ldif' % logsRemoteDataDir
            targetldif = '%s/clu/ldif-diff_checkbehavior.ldif' \
                         % logsRemoteDataDir
          </script>
          <!--- Test Case information
            #@TestMarker          ldif-diff check behavior tests
            #@TestName            ldif-diff: compare ldif files with no diffs
            #@TestIssue           none
            #@TestPurpose         Test ldif-diff to compare ldif files with
                                  no diffs
            #@TestPreamble        none
            #@TestStep            Do an ldif-diff to compare ldif files with
                                  no diffs
            #@TestPostamble       none
            #@TestResult          Success if ldif-diff returns 0.
          -->
          <testcase name="getTestCaseName
          ('ldif-diff: compare ldif files with no diffs')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldif-diff: compare ldif files with no diffs'
              </message>
              <call function="'LdifDiffWithScript-new'">
                {
                'sourceLdif' : sourceldif ,
                'targetLdif' : sourceldif ,
                'outputLdif' : '%s/ldif-diff_nodiffs.out' \
                               % DIRECTORY_INSTANCE_DIR
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <!--- Test Case information
            #@TestMarker          ldif-diff check behavior tests
            #@TestName            ldif-diff: compare ldif files with diffs
            #@TestIssue           2641
            #@TestPurpose         Test ldif-diff to compare ldif files with
                                  diffs
            #@TestPreamble        none
            #@TestStep            Do an ldif-diff to compare ldif files with
                                  diffs
            #@TestPostamble       none
            #@TestResult          Success if ldif-diff returns 1.
          -->
          <testcase name="getTestCaseName
          ('ldif-diff: compare ldif files with diffs')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldif-diff: compare ldif files with diffs'
              </message>
              <call function="'LdifDiffWithScript-new'">
                {
                'sourceLdif' : sourceldif ,
                'targetLdif' : targetldif ,
                'outputLdif' : '%s/ldif-diff_withdiffs.out' \
                               % DIRECTORY_INSTANCE_DIR ,
                'expectedRC' : 1
                }
              </call>
              <script>
                knownIssue(2641)
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <!--- Test Case information
            #@TestMarker          ldif-diff check behavior tests
            #@TestName            ldif-diff: check diff file
            #@TestIssue           none
            #@TestPurpose         Check ldif file generated by ldif-diff
            #@TestPreamble        none
            #@TestStep            Do an ldif-diff to compare ldif files with
                                  diffs
            #@TestStep            Check this ldif file using compareFile
            #@TestPostamble       none
            #@TestResult          Success if compareFile returns 0.
          -->
          <testcase name="getTestCaseName('ldif-diff: check diff file')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldif-diff: check diff file'
              </message>
              <call function="'LdifDiffWithScript-new'">
                {
                'sourceLdif' : sourceldif ,
                'targetLdif' : targetldif ,
                'outputLdif' : '%s/ldif-diff.out' \
                               % DIRECTORY_INSTANCE_DIR ,
                'expectedRC' : 'noCheck'
                }
              </call>
              <call function="'compareFile'">
                {
                'outputFile' : 'ldif-diff.out' ,
                'refFile'    : 'ldif-diff.ref'
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <!--- Test Case information
            #@TestMarker          ldif-diff check behavior tests
            #@TestName            ldif-diff: check diff file
            #@TestIssue           none
            #@TestPurpose         Check ldif file generated by ldif-diff
            #@TestPreamble        none
            #@TestStep            Do an ldif-diff to compare ldif files with
                                  diffs
            #@TestStep            Check this ldif file using compareFile
            #@TestPostamble       none
            #@TestResult          Success if compareFile returns 0.
          -->
          <testcase name="getTestCaseName
          ('ldif-diff: check diff files with single value changes')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldif-diff: check diff file with single value changes'
              </message>
              <call function="'LdifDiffWithScript-new'">
                {
                'sourceLdif'         : sourceldif ,
                'targetLdif'         : targetldif ,
                'outputLdif'         : '%s/ldif-diff_singlevalue.out' \
                                       % DIRECTORY_INSTANCE_DIR ,
                'singleValueChanges' : 'True' ,
                'expectedRC'         : 'noCheck'
                }
              </call>
              <call function="'compareFile'">
                {
                'outputFile' : 'ldif-diff_singlevalue.out' ,
                'refFile'    : 'ldif-diff_singlevalue.ref'
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/clu_ldifmodify_checkbehavior.xml
New file
@@ -0,0 +1,253 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
<!--
 ! 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, exclude this CDDL HEADER in each
 ! file and exclude 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
 !
 !      Copyright 2008 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="clu_ldifmodify_checkbehavior"/>
  <function name="clu_ldifmodify_checkbehavior">
    <sequence>
      <block name="'clu_ldifmodify_checkbehavior'">
        <sequence>
          <!--- Test Suite information
            #@TestSuiteName     ldifmodify check behavior tests
            #@TestSuitePurpose  Test the results of the ldifmodify command.
            #@TestSuiteGroup    ldifmodify check behavior tests
            #@TestScript        clu_ldifmodify_checkbehavior.xml
          -->
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group'] = 'clu'
            CurrentTestPath['suite'] = STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <!--- Define default value for sourceldif -->
          <script>
            sourceldif = '%s/clu/clu_start.ldif' % logsRemoteDataDir
          </script>
          <!--- Test Case information
            #@TestMarker          ldifmodify check behavior tests
            #@TestName            ldifmodify: add, delete and modify operations
            #@TestIssue           none
            #@TestPurpose         Test ldifmodify with add, delete and modify
                                  operations
            #@TestPreamble        none
            #@TestStep            Do an ldifmodify with add, delete and modify
                                  operations.
            #@TestStep            Do an ldif-diff to check that generated ldif
                                  is correct.
            #@TestPostamble       none
            #@TestResult          Success if ldifmodify and ldif-diff return 0.
          -->
          <testcase name="getTestCaseName
          ('ldifmodify: add, delete and modify operations')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldifmodify: add, delete and modify operations'
              </message>
              <call function="'LdifModifyWithScript'">
                {
                'sourceLdif'  : sourceldif ,
                'changesLdif' : '%s/clu/ldifmodify_checkbehavior.ldif' \
                                % logsRemoteDataDir ,
                'targetLdif'  : '%s/ldifmodify.out' % DIRECTORY_INSTANCE_DIR
                }
              </call>
              <call function="'LdifDiffWithScript'">
                {
                'sourceLdif' : '%s/ldifmodify.out' % DIRECTORY_INSTANCE_DIR ,
                'targetLdif' : '%s/clu/ldifmodify.ref' % logsRemoteDataDir ,
                'outputLdif' : '%s/ldifmodify.diff' % DIRECTORY_INSTANCE_DIR
                }
              </call>
              <call function="'checktestRC'">
                {
                'returncode' : STAXResult ,
                'result'     : STAXResult
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <!--- Test Case information
            #@TestMarker          ldifmodify check behavior tests
            #@TestName            ldifmodify: moddn operation
            #@TestIssue           none
            #@TestPurpose         Test ldifmodify with moddn operation
            #@TestPreamble        none
            #@TestStep            Do an ldifmodify with moddn operation.
            #@TestPostamble       none
            #@TestResult          Success if ldifmodify returns 1 and if the
                                  output is correct.
          -->
          <testcase name="getTestCaseName('ldifmodify: moddn operation')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldifmodify: moddn operation'
              </message>
              <call function="'LdifModifyWithScript'">
                {
                'sourceLdif'  : sourceldif ,
                'changesLdif' : '%s/clu/ldifmodify_moddn.ldif' \
                                % logsRemoteDataDir ,
                'targetLdif'  : '%s/ldifmodify_moddn.out' \
                                % DIRECTORY_INSTANCE_DIR ,
                'expectedRC'  : 1
                }
              </call>
              <script>
                returnString = STAXResult[0][1]
                msg1 = 'The modify DN operation targeted at entry uid=user.0,'
                msg2 = 'ou=ldapsearch,o=clu tests,dc=example,dc=com cannot be'
                msg3 = 'processed because modify DN operations are not'
                msg4 = 'supported by the LDIF modify tool'
                msg = '%s%s %s %s' % (msg1, msg2, msg3, msg4)
              </script>
              <call function="'checktestString'">
                {
                'returnString'   : returnString ,
                'expectedString' : msg
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <!--- Test Case information
           #@TestMarker        ldifmodify check behavior tests
           #@TestName          ldifmodify: concurrente modify/delete operations
           #@TestIssue         none
           #@TestPurpose       Test ldifmodify with concurrente modify/delete
                               operations
           #@TestPreamble      none
           #@TestStep          Do an ldifmodify with  concurrente modify/delete
                               operations.
           #@TestPostamble     none
           #@TestResult        Success if ldifmodify returns 1 and if the
                               output is correct.
          -->
          <testcase name="getTestCaseName
          ('ldifmodify: concurrente modify/delete operations')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'ldifmodify: concurrente modify/delete operations'
              </message>
              <call function="'LdifModifyWithScript'">
                {
                'sourceLdif'  : sourceldif ,
                'changesLdif' : '%s/clu/ldifmodify_concurrente.ldif' \
                                % logsRemoteDataDir ,
                'targetLdif'  : '%s/ldifmodify_concurrente.out' \
                                % DIRECTORY_INSTANCE_DIR ,
                'expectedRC'  : 1
                }
              </call>
              <script>
                returnString = STAXResult[0][1]
              </script>
              <script>
                msg1 = 'Entry uid=user.2000,ou=ldapsearch,o=clu tests,'
                msg2 = 'dc=example,dc=com cannot be deleted because it'
                msg3 = 'was previously added in the set of changes.'
                msg4 = 'This is not supported by the LDIF modify tool'
                msg = '%s%s %s  %s' % (msg1, msg2, msg3, msg4)
              </script>
              <call function="'checktestString'">
                {
                'returnString'   : returnString ,
                'expectedString' : msg
                }
              </call>
              <script>
                msg1 = 'Cannot modify entry uid=user.2000,ou=ldapsearch,'
                msg2 = 'o=clu tests,dc=example,dc=com because it was'
                msg3 = 'previously added or deleted in the set of changes.'
                msg4 = 'This is not supported by the LDIF modify tool'
                msg = '%s%s %s  %s' % (msg1, msg2, msg3, msg4)
              </script>
              <call function="'checktestString'">
                {
                'returnString'   : returnString ,
                'expectedString' : msg
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>