clu_ldapmodify_checkoptions.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_ldapmodify_checkoptions"/>
<function name="clu_ldapmodify_checkoptions">
<sequence>
<block name="'clu_ldapmodify_checkoptions'">
<sequence>
<!--- Test Suite information
#@TestSuiteName ldapmodify check options tests
#@TestSuitePurpose Check the ldapmodify command with
common options and input/output options.
#@TestSuiteGroup ldapmodify check options tests
#@TestScript clu_ldapmodify_checkoptions.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'clu'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!--- Define default value for dsfilename -->
<script>
dsfilename = '%s/clu/ldapmodify_checkoptions.ldif' \
% remote.data
</script>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: correct options
#@TestIssue none
#@TestPurpose Test ldapmodify with correct options.
#@TestPreamble none
#@TestStep Do an ldapmodify with correct options.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 0.
-->
<testcase name="getTestCaseName('ldapmodify: correct options')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: correct options'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: empty hostname
#@TestIssue 2619
#@TestPurpose Verify a parameter error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an empty hostname.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 89.
-->
<testcase name="getTestCaseName('ldapmodify: empty hostname')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: empty hostname'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : ' ',
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename ,
'expectedRC' : 89
}
</call>
<script>
knownIssue(2619)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: invalid hostname
#@TestIssue none
#@TestPurpose Verify a connection error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an invalid hostname.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 91.
-->
<testcase name="getTestCaseName('ldapmodify: invalid hostname')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: invalid hostname'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : 'bad_host' ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsAdd' : '' ,
'dsFilename' : dsfilename ,
'expectedRC' : 91
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: invalid port (bad_port)
#@TestIssue 2619
#@TestPurpose Verify a parameter error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an invalid port.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 89.
-->
<testcase name="getTestCaseName
('ldapmodify: invalid port (bad_port)')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: invalid port (bad_port)'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : 'bad_port' ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename ,
'expectedRC' : 89
}
</call>
<script>
knownIssue(2619)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: invalid port (-1)
#@TestIssue 2762
#@TestPurpose Verify a parameter error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an invalid port.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 89.
-->
<testcase name="getTestCaseName('ldapmodify: invalid port (-1)')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: invalid port (-1)'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : -1 ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename ,
'expectedRC' : 89
}
</call>
<script>
knownIssue(2762)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: no binddn
#@TestIssue none
#@TestPurpose Verify an insufficient access rights error
doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with no binddn.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 50.
-->
<testcase name="getTestCaseName('ldapmodify: no binddn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: no binddn'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: invalid binddn
#@TestIssue none
#@TestPurpose Verify an invalid credentials error
doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an invalid binddn.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 49.
-->
<testcase name="getTestCaseName('ldapmodify: invalid binddn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: invalid binddn'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'cn=bad dn' ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename ,
'expectedRC' : 49
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: no password
#@TestIssue 2624
#@TestPurpose Verify an inappropriate authentication error
doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify without a password.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 48.
-->
<!-- This test is prompting for the password -->
<!--- Comment out this testcase as it hangs on some platform -->
<!---
<testcase name="getTestCaseName('ldapmodify: no password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: no password'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsFilename' : dsfilename ,
'expectedRC' : 48
}
</call>
<script>
knownIssue(2624)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
-->
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: invalid password
#@TestIssue none
#@TestPurpose Verify an invalid credentials error
doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an invalid password.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 49.
-->
<testcase name="getTestCaseName('ldapmodify: invalid password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: invalid password'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : 'bad_password' ,
'dsFilename' : dsfilename ,
'expectedRC' : 49
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: empty filename
#@TestIssue 2619
#@TestPurpose Verify a parameter error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with an empty filename.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 89.
-->
<testcase name="getTestCaseName('ldapmodify: empty filename')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: empty filename'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : ' ' ,
'expectedRC' : 89
}
</call>
<script>
knownIssue(2619)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: bad filename
#@TestIssue 2763
#@TestPurpose Verify a parameter error doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with a bad filename.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 89.
-->
<testcase name="getTestCaseName('ldapmodify: bad filename')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: bad filename'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : 'bad' ,
'expectedRC' : 89
}
</call>
<script>
knownIssue(2763)
</script>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: add entries option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with the add entries option.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 0.
-->
<testcase name="getTestCaseName('ldapmodify: add entries option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: add entries option'
</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : dsfilename
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: verbose option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with the verbose option.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 0.
-->
<testcase name="getTestCaseName('ldapmodify: verbose option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: verbose option'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsVerbose' : 'True',
'dsFilename' : dsfilename
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: continueOnError option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with the continueOnError
option.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 0.
-->
<testcase name="getTestCaseName
('ldapmodify: continueOnError option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: continueOnError option'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsContinueOnError' : 'True',
'dsFilename' : dsfilename
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapmodify check options tests
#@TestName ldapmodify: help option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapmodify.
#@TestPreamble none
#@TestStep Do an ldapmodify with the help option.
#@TestPostamble none
#@TestResult Success if ldapmodify returns 0.
-->
<testcase name="getTestCaseName('ldapmodify: help option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapmodify: help option'
</message>
<call function="'ldapModifyWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsHelp' : 'True',
'dsFilename' : dsfilename
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>