0N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1416N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
0N/A<!--
0N/A ! CDDL HEADER START
0N/A !
0N/A ! The contents of this file are subject to the terms of the
0N/A ! Common Development and Distribution License, Version 1.0 only
0N/A ! (the "License"). You may not use this file except in compliance
0N/A ! with the License.
0N/A !
0N/A ! You can obtain a copy of the license at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A ! See the License for the specific language governing permissions
0N/A ! and limitations under the License.
0N/A !
0N/A ! When distributing Covered Code, exclude this CDDL HEADER in each
0N/A ! file and exclude the License file at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A ! add the following below this CDDL HEADER, with the fields enclosed
0N/A ! by brackets "[]" replaced with your own identifying information:
0N/A ! Portions Copyright [yyyy] [name of copyright owner]
0N/A !
0N/A ! CDDL HEADER END
0N/A !
0N/A ! Copyright 2008-2009 Sun Microsystems, Inc.
0N/A ! -->
0N/A<stax>
0N/A
0N/A <defaultcall function="general_options"/>
0N/A
0N/A <function name="general_options">
0N/A
0N/A <sequence>
0N/A
0N/A <!--- Test Suite information
0N/A #@TestSuiteName Setup-Uninstall general_options Tests
0N/A #@TestSuitePurpose Test the general options of both setup and
0N/A uninstall commands. General options include
0N/A 'help', 'version', ...
914N/A #@TestSuiteGroup general_options
0N/A #@TestSuiteID general_options Tests
0N/A #@TestGroup Setup-Uninstall
0N/A #@TestScript general_options.xml
0N/A #@TestHTMLLink http://opends.dev.java.net/
914N/A -->
914N/A
914N/A <script>
914N/A if not CurrentTestPath.has_key('group'):
914N/A CurrentTestPath['group'] = 'setup'
914N/A CurrentTestPath['suite'] = 'general_options'
914N/A </script>
914N/A
914N/A <call function="'testSuite_Preamble'"/>
914N/A
914N/A <!--- Test Case information
914N/A #@TestMarker Setup-Uninstall general_options Tests
914N/A #@TestName Setup-Uninstall: general_options:
914N/A setup_uninstall_version
914N/A #@TestID setup_uninstall_version
914N/A #@TestPurpose Test the 'version' option of the commands
914N/A #@TestPreamble
914N/A #@TestStep Test 'version' option of setup command
914N/A Test 'version' option of uninstall command
914N/A #@TestPostamble
914N/A #@TestResult PASS if all steps ran without errors
914N/A -->
914N/A <testcase name="getTestCaseName('setup_uninstall_version')">
0N/A
0N/A <sequence>
0N/A
0N/A <call function="'testCase_Preamble'"/>
0N/A <message>'Setup Uninstall: Version option'</message>
914N/A
914N/A <script>
914N/A setupCmd = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
914N/A setupParams = '--version'
0N/A </script>
0N/A
0N/A <message>'%s %s' % (setupCmd, setupParams)</message>
0N/A <call function="'runCommand'">
0N/A { 'location' : STAF_REMOTE_HOSTNAME,
0N/A 'name' : 'Launch setup command to get DS version',
914N/A 'command' : setupCmd,
914N/A 'arguments' : setupParams,
914N/A 'path' : ODS_UNZIPPED,
914N/A 'expectedRC': 0,
0N/A 'outputFile': '%s/go-setup-version.txt' % OUT_GROUP,
0N/A }
0N/A </call>
0N/A
0N/A <script>
914N/A grepFile = '%s/go-setup-version.txt' % OUT_GROUP
914N/A </script>
914N/A
914N/A <call function="'grep'">
914N/A { 'location' : STAF_REMOTE_HOSTNAME,
914N/A 'filename' : grepFile,
914N/A 'testString': PRODUCTNAME
914N/A }
914N/A </call>
914N/A
914N/A <script>
914N/A uninstallCmd = '%s/%s/uninstall%s' % (ODS_UNZIPPED, \
914N/A OPENDSNAME, fileExt)
914N/A uninstallParams = '--version'
914N/A </script>
914N/A
914N/A <message>'%s %s' % (uninstallCmd, uninstallParams)</message>
914N/A <call function="'runCommand'">
914N/A { 'location' : STAF_REMOTE_HOSTNAME,
914N/A 'name' : 'Launch uninstall command to get DS version',
914N/A 'command' : uninstallCmd,
0N/A 'arguments' : uninstallParams,
0N/A 'path' : ODS_UNZIPPED,
0N/A 'expectedRC': 0,
0N/A 'outputFile': '%s/go-uninstall-version.txt' % OUT_GROUP,
0N/A }
914N/A </call>
914N/A
914N/A <script>
914N/A grepFile = '%s/go-uninstall-version.txt' % OUT_GROUP
914N/A </script>
914N/A
914N/A <call function="'grep'">
914N/A { 'location' : STAF_REMOTE_HOSTNAME,
914N/A 'filename' : grepFile,
914N/A 'testString': PRODUCTNAME
914N/A }
914N/A </call>
914N/A
942N/A <call function="'testCase_Postamble'"/>
398N/A
914N/A </sequence>
914N/A
914N/A </testcase>
914N/A
914N/A <!--- Test Case information
914N/A #@TestMarker Setup-Uninstall general_options Tests
914N/A #@TestName Setup-Uninstall: general_options:
430N/A setup_uninstall_help
0N/A #@TestID setup_uninstall_help
0N/A #@TestPurpose Test the 'help' option of the commands
0N/A #@TestPreamble
0N/A #@TestStep Test 'help' option of setup command
0N/A Test 'help' option of uninstall command
0N/A #@TestPostamble
0N/A #@TestResult PASS if all steps ran without errors
0N/A -->
0N/A <testcase name="getTestCaseName('setup_uninstall_help')">
0N/A
0N/A <sequence>
0N/A
0N/A <call function="'testCase_Preamble'"/>
535N/A <message>'Setup Uninstall: Help option'</message>
117N/A <script>
0N/A setupCmd = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
0N/A setupParams = '--help'
0N/A </script>
0N/A
0N/A <message>'%s %s' % (setupCmd, setupParams)</message>
0N/A <call function="'runCommand'">
0N/A { 'location' : STAF_REMOTE_HOSTNAME,
0N/A 'name' : 'Launch setup command to get its help',
0N/A 'command' : setupCmd,
0N/A 'arguments' : setupParams,
0N/A 'path' : ODS_UNZIPPED,
0N/A 'expectedRC': 0,
0N/A 'outputFile': '%s/go-setup-help.txt' % OUT_GROUP,
0N/A }
0N/A </call>
0N/A
0N/A <script>
0N/A grepFile = '%s/go-setup-help.txt' % OUT_GROUP
0N/A </script>
0N/A
0N/A <call function="'grep'">
0N/A { 'location' : STAF_REMOTE_HOSTNAME,
0N/A 'filename' : grepFile,
0N/A 'testString': 'Usage'
0N/A }
0N/A </call>
0N/A
0N/A <script>
0N/A uninstallCmd = '%s/%s/uninstall%s' % (ODS_UNZIPPED, \
0N/A OPENDSNAME, fileExt)
0N/A uninstallParams = '--help'
0N/A </script>
0N/A
0N/A <message>'%s %s' % (uninstallCmd, uninstallParams)</message>
0N/A <call function="'runCommand'">
0N/A { 'location' : STAF_REMOTE_HOSTNAME,
0N/A 'name' : 'Launch uninstall command to get its help',
0N/A 'command' : uninstallCmd,
0N/A 'arguments' : uninstallParams,
0N/A 'path' : ODS_UNZIPPED,
1220N/A 'expectedRC': 0,
1220N/A 'outputFile': '%s/go-uninstall-help.txt' % OUT_GROUP,
0N/A }
0N/A </call>
0N/A
0N/A <script>
0N/A grepFile = '%s/go-uninstall-help.txt' % OUT_GROUP
0N/A </script>
0N/A
0N/A <call function="'grep'">
0N/A { 'location' : STAF_REMOTE_HOSTNAME,
0N/A 'filename' : grepFile,
0N/A 'testString': 'Usage'
0N/A }
0N/A </call>
0N/A
0N/A <call function="'testCase_Postamble'"/>
0N/A
0N/A </sequence>
0N/A
0N/A </testcase>
0N/A <call function="'testSuite_Postamble'"/>
0N/A
0N/A </sequence>
0N/A
0N/A </function>
0N/A
0N/A</stax>
0N/A