3612N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3612N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
3612N/A<!--
3612N/A ! CDDL HEADER START
3612N/A !
3612N/A ! The contents of this file are subject to the terms of the
3612N/A ! Common Development and Distribution License, Version 1.0 only
3612N/A ! (the "License"). You may not use this file except in compliance
3612N/A ! with the License.
3612N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A ! or http://forgerock.org/license/CDDLv1.0.html.
3612N/A ! See the License for the specific language governing permissions
3612N/A ! and limitations under the License.
3612N/A !
6982N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
3612N/A ! Portions Copyright [yyyy] [name of copyright owner]
3612N/A !
3612N/A ! CDDL HEADER END
3612N/A !
3612N/A ! Copyright 2008 Sun Microsystems, Inc.
3612N/A ! -->
3612N/A<stax>
3612N/A
3612N/A <defaultcall function="incompatible_options"/>
3612N/A
3612N/A <function name="incompatible_options">
3612N/A
3612N/A <sequence>
3612N/A
3612N/A <!--- Test Suite information
3612N/A #@TestSuiteName Setup-Uninstall incompatible_options Tests
3612N/A #@TestSuitePurpose Test incompatibilities between options of
3612N/A both setup and uninstall commands. In other words,
3612N/A if 2 incompatible options are specified on the
3612N/A same command line, the command should fail
3612N/A #@TestSuiteGroup incompatible_options
3612N/A #@TestSuiteID incompatible_options Tests
3612N/A #@TestGroup Setup-Uninstall
3612N/A #@TestScript incompatible_options.xml
3612N/A #@TestHTMLLink http://opends.dev.java.net/
3612N/A -->
3612N/A
3612N/A <script>
3612N/A if not CurrentTestPath.has_key('group'):
3612N/A CurrentTestPath['group'] = 'setup'
3612N/A CurrentTestPath['suite'] = 'incompatible_options'
3612N/A </script>
3612N/A
3612N/A <call function="'testSuite_Preamble'"/>
3612N/A
3612N/A <!--- Test Case information
3612N/A #@TestMarker Setup-Uninstall incompatible_options Tests
3612N/A #@TestName Setup-Uninstall: incompatible_options:
3612N/A inc_base_ldif
3612N/A #@TestID inc_base_ldif
3612N/A #@TestPurpose Check that 'addBaseEntry' and 'ldifFile' setup
3612N/A options cannot be specified together
3612N/A #@TestPreamble
3612N/A #@TestStep Setup OpenDS with 'addBaseEntry' and 'ldifFile'
3612N/A options, and check for error
3612N/A #@TestPostamble
3612N/A #@TestResult PASS if all steps ran without errors
3612N/A -->
3612N/A <testcase name="getTestCaseName('inc_base_ldif')">
3612N/A <sequence>
3612N/A
3612N/A <script>
3816N/A INC_LDIF_FILE = '%s/setup/inc-options.ldif' % remote.data
3612N/A </script>
3612N/A
3612N/A <call function="'testCase_Preamble'"/>
3612N/A <message>'Incompatible Options: addBaseEntry ldifFile'</message>
3612N/A
3612N/A <script>
3612N/A c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3612N/A p = []
3612N/A p.append('--cli --no-prompt --ldapPort 10000')
3612N/A p.append('--rootUserPassword "kangourou"')
3612N/A p.append('--baseDN "o=o1"')
3612N/A p.append('--addBaseEntry')
3612N/A p.append('--ldifFile %s' % INC_LDIF_FILE)
3612N/A p = ' '.join(p)
3612N/A </script>
3612N/A
3612N/A <message>'%s %s' % (c, p)</message>
3612N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3612N/A 'name' : 'Launch setup command',
3612N/A 'command' : c,
3612N/A 'arguments' : p,
3612N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 2,
3612N/A 'outputFile': '%s/inc-base-ldif-setup.txt' % OUT_GROUP,
3612N/A }
3612N/A </call>
3612N/A
3612N/A <call function="'testCase_Postamble'"/>
3612N/A
3612N/A </sequence>
3612N/A </testcase>
3612N/A
3612N/A <!--- Test Case information
3612N/A #@TestMarker Setup-Uninstall incompatible_options Tests
3612N/A #@TestName Setup-Uninstall: incompatible_options:
3612N/A inc_base_data
3612N/A #@TestID inc_base_data
3612N/A #@TestPurpose Check that 'addBaseEntry' and 'sampleData' setup
3612N/A options cannot be specified together
3612N/A #@TestPreamble
3612N/A #@TestStep Setup OpenDS with 'addBaseEntry' and 'sampleData'
3612N/A options, and check for error
3612N/A #@TestPostamble
3612N/A #@TestResult PASS if all steps ran without errors
3612N/A -->
3612N/A <testcase name="getTestCaseName('inc_base_data')">
3612N/A <sequence>
3612N/A
3612N/A <call function="'testCase_Preamble'"/>
3612N/A <message>'Incompatible Options: addBaseEntry sampleData'</message>
3612N/A
3612N/A <script>
3612N/A c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3612N/A p = []
3612N/A p.append('--cli --no-prompt --ldapPort 10000')
3612N/A p.append('--rootUserPassword "kangourou"')
3612N/A p.append('--baseDN "o=o1"')
3612N/A p.append('--addBaseEntry')
3612N/A p.append('--sampleData 10')
3612N/A p = ' '.join(p)
3612N/A </script>
3612N/A
3612N/A <message>'%s %s' % (c, p)</message>
3612N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3612N/A 'name' : 'Launch setup command',
3612N/A 'command' : c,
3612N/A 'arguments' : p,
3612N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 2,
3612N/A 'outputFile': '%s/inc-base-data-setup.txt' % OUT_GROUP,
3612N/A }
3612N/A </call>
3612N/A
3612N/A <call function="'testCase_Postamble'"/>
3612N/A
3612N/A </sequence>
3612N/A </testcase>
3612N/A
3612N/A <!--- Test Case information
3612N/A #@TestMarker Setup-Uninstall Incompatible options
3612N/A #@TestName Setup-Uninstall: incompatible_options:
3612N/A inc_ldif_data
3612N/A #@TestID inc_ldif_data
3612N/A #@TestPurpose Check that 'ldifFile' and 'sampleData' setup
3612N/A options cannot be specified together
3612N/A #@TestPreamble
3612N/A #@TestStep Setup OpenDS with 'ldifFile' and
3612N/A 'sampleData' options, and check for error
3612N/A #@TestPostamble
3612N/A #@TestResult PASS if all steps ran without errors
3612N/A -->
3612N/A <testcase name="getTestCaseName('inc_ldif_data')">
3612N/A <sequence>
3612N/A
3612N/A <script>
3816N/A INC_LDIF_FILE = '%s/setup/inc-options.ldif' % remote.data
3612N/A </script>
3612N/A
3612N/A <call function="'testCase_Preamble'"/>
3612N/A <message>'Incompatible Options: ldifFile sampleData'</message>
3612N/A
3612N/A <script>
3612N/A c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3612N/A p = []
3612N/A p.append('--cli --no-prompt --ldapPort 10000')
3612N/A p.append('--rootUserPassword "kangourou"')
3612N/A p.append('--baseDN "o=o1"')
3612N/A p.append('--ldifFile %s' % INC_LDIF_FILE)
3612N/A p.append('--sampleData 10')
3612N/A p = ' '.join(p)
3612N/A </script>
3612N/A
3612N/A <message>'%s %s' % (c, p)</message>
3612N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3612N/A 'name' : 'Launch setup command',
3612N/A 'command' : c,
3612N/A 'arguments' : p,
3612N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 2,
3612N/A 'outputFile': '%s/inc-ldif-data-setup.txt' % OUT_GROUP,
3612N/A }
3612N/A </call>
3612N/A
3612N/A <call function="'testCase_Postamble'"/>
3612N/A
3612N/A </sequence>
3612N/A </testcase>
3612N/A
3612N/A <!--- Test Case information
3612N/A #@TestMarker Setup-Uninstall Incompatible options
3612N/A #@TestName Setup-Uninstall: incompatible_options:
3612N/A inc_userpwd_userpwdfile
3612N/A #@TestID inc_userpwd_userpwdfile
3612N/A #@TestPurpose Check that 'rootUserPassword' and
3612N/A 'rootUserPasswordFile' setup options cannot
3612N/A be specified together
3612N/A #@TestPreamble
3612N/A #@TestStep Setup OpenDS with 'rootUserPassword' and
3612N/A 'rootUserPasswordFile' options, and check
3612N/A for error
3612N/A #@TestPostamble
3612N/A #@TestResult PASS if all steps ran without errors
3612N/A -->
3612N/A <testcase name="getTestCaseName('inc_userpwd_userpwdfile')">
3612N/A <sequence>
3612N/A
3612N/A <script>
3816N/A INC_USER_PWD_FILE = '%s/setup/pwd.ldif' % remote.data
3612N/A </script>
3612N/A
3612N/A <call function="'testCase_Preamble'"/>
3612N/A <message>
3612N/A 'Incompatible Options: rootUserPasswordFile rootUserPassword'
3612N/A </message>
3612N/A
3612N/A <script>
3612N/A c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3612N/A p = []
3612N/A p.append('--cli --no-prompt --ldapPort 10000')
3612N/A p.append('--rootUserPassword "kangourou"')
3612N/A p.append('--rootUserPasswordFile %s' % INC_USER_PWD_FILE)
3612N/A p.append('--baseDN "o=o1"')
3612N/A p = ' '.join(p)
3612N/A </script>
3612N/A
3612N/A <message>'%s %s' % (c, p)</message>
3612N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3612N/A 'name' : 'Launch setup command',
3612N/A 'command' : c,
3612N/A 'arguments' : p,
3612N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 2,
3612N/A 'outputFile': '%s/inc-userpwd-userpwdfile.txt' % OUT_GROUP,
3612N/A }
3612N/A </call>
3612N/A
3612N/A <call function="'testCase_Postamble'"/>
3612N/A
3612N/A </sequence>
3612N/A </testcase>
3612N/A
3612N/A <call function="'testSuite_Postamble'"/>
3612N/A
3612N/A </sequence>
3612N/A
3612N/A </function>
3612N/A
3612N/A</stax>