clu_ldapcompare_checkbehavior.xml revision d81978a0815d5b8a75633c35e3e1f8708d36f017
<?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_ldapcompare_checkbehavior"/>
<function name="clu_ldapcompare_checkbehavior">
<sequence>
<block name="'clu_ldapcompare_checkbehavior'">
<sequence>
<!--- Test Suite information
#@TestSuiteName ldapcompare check behavior tests
#@TestSuitePurpose Test the results of the ldapcompare command.
#@TestSuiteGroup ldapcompare check behavior tests
#@TestScript clu_ldapcompare_checkresults.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'clu'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!--- Define default value for dsdn -->
<script>
dsdn = 'uid=user.0,ou=ldapcompare,o=clu tests,dc=example,dc=com'
</script>
<!--- Test Case information
#@TestMarker ldapcompare check behavior tests
#@TestName ldapcompare: comparison successful
#@TestIssue 2761
#@TestPurpose Verify that the operation is successful and
that the comparison is successful.
#@TestPreamble none
#@TestStep Do an ldapcompare with correct options.
#@TestPostamble none
#@TestResult Success if ldapcompare returns 6.
-->
<testcase name="getTestCaseName
('ldapcompare: comparison successful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapcompare: comparison successful'
</message>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDn' : ['postalCode=63792' ,
'%s' % dsdn] ,
'expectedRC' : 6
}
</call>
<script>
knownIssue(2761)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapcompare check behavior tests
#@TestName ldapcompare: comparison unsuccessful
#@TestIssue 2761
#@TestPurpose Verify that the operation is successful and
that the comparison is unsuccessful.
#@TestPreamble none
#@TestStep Do an ldapcompare with correct options.
#@TestPostamble none
#@TestResult Success if ldapcompare returns 5.
-->
<testcase name="getTestCaseName
('ldapcompare: comparison unsuccessful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapcompare: comparison unsuccessful'
</message>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDn' : ['postalCode=00000' ,
'%s' % dsdn] ,
'expectedRC' : 5
}
</call>
<script>
knownIssue(2761)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>