10139N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
10139N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
10139N/A<!--
12158N/A ! CDDL HEADER START
10139N/A !
10139N/A ! The contents of this file are subject to the terms of the
10139N/A ! Common Development and Distribution License, Version 1.0 only
10139N/A ! (the "License"). You may not use this file except in compliance
10139N/A ! with the License.
10139N/A !
10139N/A ! You can obtain a copy of the license at
10139N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
10139N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
12586N/A ! See the License for the specific language governing permissions
10139N/A ! and limitations under the License.
10139N/A !
10139N/A ! When distributing Covered Code, exclude this CDDL HEADER in each
10139N/A ! file and exclude the License file at
10139N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
12586N/A ! add the following below this CDDL HEADER, with the fields enclosed
10142N/A ! by brackets "[]" replaced with your own identifying information:
12132N/A ! Portions Copyright [yyyy] [name of copyright owner]
12132N/A !
10142N/A ! CDDL HEADER END
12773N/A !
12773N/A ! Copyright 2008 Sun Microsystems, Inc.
12773N/A ! -->
10139N/A<stax>
12107N/A
10139N/A <defaultcall function="misc"/>
10139N/A
10139N/A <function name="misc">
12586N/A
10139N/A <sequence>
10139N/A
10139N/A <!--- Test Suite information
10139N/A #@TestSuiteName Setup-Uninstall misc Tests
10139N/A #@TestSuitePurpose Test miscelaneous setup/uninstall commands
10139N/A that do not fit into any other test suite
10139N/A #@TestSuiteGroup misc
12107N/A #@TestSuiteID misc Tests
11438N/A #@TestGroup Setup-Uninstall
12107N/A #@TestScript misc.xml
10139N/A #@TestHTMLLink http://opends.dev.java.net/
11419N/A -->
12131N/A
11419N/A <script>
12174N/A if not CurrentTestPath.has_key('group'):
11419N/A CurrentTestPath['group'] = 'setup'
11419N/A CurrentTestPath['suite'] = 'misc'
11419N/A </script>
11438N/A
12107N/A <call function="'testSuite_Preamble'"/>
11981N/A
12127N/A <call function="'getFreePort'">
10139N/A {
10139N/A 'host' : STAF_REMOTE_HOSTNAME,
10139N/A 'port' : 7500,
10139N/A }
10139N/A </call>
10139N/A <script>MISC_I1_PORT = STAXResult</script>
10139N/A
10139N/A <message>
10139N/A 'Got this free port: %s' % MISC_I1_PORT
10139N/A </message>
10139N/A
10139N/A <!--- Test Case information
10139N/A #@TestMarker Setup-Uninstall Misc tests
10139N/A #@TestName Setup-Uninstall: Misc:
10139N/A misc
10139N/A #@TestID misc
10139N/A #@TestPurpose Launch buggy setup and uninstall commands and
10139N/A check that they are rejected
10139N/A #@TestPreamble
10139N/A #@TestStep Unzip OpenDS ZIP delivery
10139N/A Setup OpenDS with unexisting option
10139N/A Check for error
10139N/A Setup OpenDS with no options
10139N/A Check for error
10139N/A Uninstall an uninstalled OpenDS
10139N/A Check for error
10139N/A #@TestPostamble
10139N/A #@TestResult PASS if all steps ran without errors
10139N/A -->
10139N/A <testcase name="getTestCaseName('misc')">
10139N/A <sequence>
10139N/A
10139N/A <script>
10139N/A MISC_I1_BASE = '%s/misc_i1' % (OUT_GROUP)
10139N/A MISC_I1_ROOT = '%s/%s' % (MISC_I1_BASE, OPENDSNAME)
10139N/A </script>
10139N/A
10139N/A
10139N/A <call function="'testCase_Preamble'"/>
10139N/A <message>'Setup Uninstall: Command errors'</message>
10139N/A
10139N/A <!-- 1. Setup options: baseDN baseDN sampleData -->
10139N/A <message>'++ Setup options: baseDN baseDN sampleData'</message>
10139N/A <message>'Prepare Open DS ZIP (in %s)' % MISC_I1_ROOT</message>
10139N/A
10139N/A <call function="'runSTAFCommand'">
10139N/A { 'name' : 'Create directory to contain I1',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'service' : 'FS',
10139N/A 'request' : 'CREATE',
10139N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % MISC_I1_BASE
10139N/A }
10139N/A </call>
10139N/A
10139N/A <call function="'checktestRC'">
10139N/A { 'returncode' : RC,
10139N/A 'expected' : 0,
10139N/A 'result' : 'FAIL to create directory',
10139N/A }
10139N/A </call>
10139N/A
10139N/A <call function="'runSTAFCommand'">
10139N/A { 'name' : 'Extract OpenDS ZIP file',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'service' : 'ZIP',
10139N/A 'request' : 'UNZIP',
10139N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
10139N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, MISC_I1_BASE)
10139N/A }
10139N/A </call>
10139N/A
10142N/A <call function="'checktestRC'">
10139N/A { 'returncode' : RC,
10139N/A 'expected' : 0,
12176N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
10139N/A }
12586N/A </call>
12125N/A
10139N/A <script>
10139N/A c = '%s/setup%s' % (MISC_I1_ROOT, fileExt)
12131N/A p = []
12104N/A p.append('--cli --no-prompt')
11855N/A p.append('--rootUserPassword "kangourou"')
12142N/A p.append('--doesNotExist')
11855N/A p = ' '.join(p)
11855N/A </script>
12629N/A
11855N/A <message>'%s %s' % (c, p)</message>
11855N/A <call function="'runCommand'">
10981N/A { 'location' : STAF_REMOTE_HOSTNAME,
12154N/A 'name' : 'Launch (buggy) setup command for I1',
10981N/A 'command' : c,
12127N/A 'arguments' : p,
10139N/A 'path' : MISC_I1_ROOT,
10139N/A 'expectedRC': 2,
10139N/A 'outputFile': '%s/misc-setup1-i1.txt' % OUT_GROUP,
10139N/A }
10139N/A </call>
10142N/A
10139N/A <script>
10139N/A c = '%s/setup%s' % (MISC_I1_ROOT, fileExt)
10139N/A p = []
10139N/A p.append('--cli --no-prompt')
10139N/A p = ' '.join(p)
10139N/A </script>
10139N/A
10139N/A <message>'%s %s' % (c, p)</message>
10139N/A <call function="'runCommand'">
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'name' : 'Launch (another buggy) setup command for I1',
10139N/A 'command' : c,
10139N/A 'arguments' : p,
10139N/A 'path' : MISC_I1_ROOT,
10139N/A 'expectedRC': 2,
10139N/A 'outputFile': '%s/misc-setup2-i1.txt' % OUT_GROUP,
10139N/A }
10139N/A </call>
10139N/A
10139N/A <script>
10139N/A c = '%s/uninstall%s' % (MISC_I1_ROOT, fileExt)
10139N/A p = []
10139N/A p.append('--cli --no-prompt --trustAll')
10139N/A p.append('--removeAll')
10139N/A p = ' '.join(p)
10139N/A </script>
12773N/A
12773N/A <message>'%s %s' % (c, p)</message>
12773N/A <call function="'runCommand'">
12773N/A { 'location' : STAF_REMOTE_HOSTNAME,
12773N/A 'name' : 'Launch uninstall command for (uninstalled) I1',
10139N/A 'command' : c,
10139N/A 'arguments' : p,
10139N/A 'path' : MISC_I1_ROOT,
10139N/A 'expectedRC': 2,
10139N/A 'outputFile': '%s/misc-uninstall-i1.txt' % OUT_GROUP,
10139N/A }
10139N/A </call>
10139N/A
10139N/A
10139N/A <call function="'testCase_Postamble'"/>
10139N/A
10139N/A </sequence>
10139N/A </testcase>
10139N/A
10139N/A <call function="'testSuite_Postamble'"/>
10139N/A
10139N/A </sequence>
10139N/A
10139N/A </function>
10139N/A
10139N/A</stax>
10139N/A