10139N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
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 17185N/A ! (the "License"). You may not use this file except in compliance 10139N/A ! See the License for the specific language governing permissions 10139N/A ! and limitations under the License. 10139N/A ! When distributing Covered Code, include this CDDL HEADER in each 17866N/A ! If applicable, add the following below this CDDL HEADER, with the 18442N/A ! fields enclosed by brackets "[]" replaced with your own identifying 10139N/A ! Portions Copyright [yyyy] [name of copyright owner] 10794N/A ! Copyright 2008 Sun Microsystems, Inc. 10139N/A ! Portions Copyright 2013 ForgeRock AS 12773N/A <
defaultcall function="ports"/>
18099N/A #@TestSuiteName Setup-Uninstall ports Tests 10861N/A #@TestSuitePurpose Test all port relative setup and uninstall 18099N/A options (port conflict, access right on port, 16690N/A CurrentTestPath['group'] = 'setup'
18099N/A CurrentTestPath['suite'] = 'ports'
10139N/A <
call function="'testSuite_Preamble'"/>
10139N/A <
call function="'getFreePort'">
10139N/A <
script>PORTS_I1_PORT = STAXResult</
script>
10139N/A <
call function="'getFreePort'">
10139N/A <
script>PORTS_I1_ADMIN_PORT = STAXResult</
script>
10139N/A <
call function="'getFreePort'">
10139N/A <
script>PORTS_I2_PORT = STAXResult</
script>
17891N/A 'Got 3 free ports: %s, %s and %s' \
10139N/A % (PORTS_I1_PORT, PORTS_I1_ADMIN_PORT, PORTS_I2_PORT)
10139N/A #@TestMarker Setup-Uninstall ports Tests 10139N/A #@TestName Setup-Uninstall: Ports: 17891N/A #@TestPurpose Setup a first instance to bind a port 10139N/A #@TestStep Setup a first instance to bind a port 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('bind-port')">
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <
message>'Ports: Setup a first instance to bind a port'</
message>
10139N/A PORTS_I1_ROOT = '%s/%s' % (PORTS_I1_BASE, OPENDSNAME)
10139N/A <
message>'Prepare Open DS ZIP (in %s)' % PORTS_I1_ROOT</
message>
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Create directory to contain I1',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % PORTS_I1_BASE
10139N/A <
call function="'checktestRC'">
10139N/A 'result' : 'FAIL to create directory',
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Extract OpenDS ZIP file',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
18099N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
18099N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I1_BASE)
17866N/A <
call function="'checktestRC'">
16998N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
17891N/A <
message>'%s %s' % (c, p)</
message>
17891N/A { 'location' : STAF_REMOTE_HOSTNAME,
17891N/A 'name' : 'Setup a first instance to bind a port',
10139N/A <
call function="'testCase_Postamble'"/>
12773N/A #@TestMarker Setup-Uninstall ports Tests 12773N/A #@TestName Setup-Uninstall: Ports: 10139N/A #@TestPurpose Setup OpenDS, specifying a used LDAP port 10139N/A #@TestStep Setup OpenDS, specifying a used LDAP port 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('ldap-port-conflict')">
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <
message>'Ports: LDAP port conflict'</
message>
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'name' : 'Launch setup command with LDAP port conflict',
10139N/A <
call function="'testCase_Postamble'"/>
10139N/A #@TestMarker Setup-Uninstall ports Tests 10139N/A #@TestName Setup-Uninstall: Ports: 10139N/A #@TestPurpose Setup OpenDS, specifying a used LDAPS port 10139N/A #@TestStep Setup OpenDS, specifying a used LDAPS port 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('ldaps-port-conflict')">
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <
message>'Ports: LDAPS port conflict'</
message>
10139N/A <!-- Remove and recreate the unzipped instance --> 10139N/A <
call function="'runSTAFCommand'">
12402N/A { 'name' : 'Delete directory containing unzipped OpenDS',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED
10139N/A <
call function="'checktestRC'">
10139N/A 'result' : 'FAIL to remove files for this group at cleanup',
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Create directory to contain unzipped OpenDS',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Extract OpenDS ZIP file',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
10139N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED)
18442N/A <
call function="'checktestRC'">
18397N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
18091N/A <
message>'%s %s' % (c, p)</
message>
18093N/A { 'location' : STAF_REMOTE_HOSTNAME,
18091N/A 'name' : 'Launch setup command with LDAPS port conflict',
17897N/A <
call function="'testCase_Postamble'"/>
17866N/A #@TestMarker Setup-Uninstall ports Tests 17866N/A #@TestName Setup-Uninstall: Ports: 17866N/A #@TestPurpose Setup OpenDS, specifying a used JMX port 17554N/A #@TestStep Setup OpenDS, specifying a used JMX port 17358N/A #@TestResult PASS if all steps ran without errors 17259N/A <
testcase name="getTestCaseName('jmx-port-conflict')">
17081N/A <
call function="'testCase_Preamble'"/>
16998N/A <
message>'Ports: JMX port conflict'</
message>
16976N/A <!-- Remove and recreate the unzipped instance --> 16976N/A <
call function="'runSTAFCommand'">
16977N/A { 'name' : 'Delete directory containing unzipped OpenDS',
16918N/A 'location' : STAF_REMOTE_HOSTNAME,
16786N/A 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED
16771N/A <
call function="'checktestRC'">
16690N/A 'result' : 'FAIL to remove files for this group at cleanup',
16684N/A <
call function="'runSTAFCommand'">
16676N/A { 'name' : 'Create directory to contain unzipped OpenDS',
16676N/A 'location' : STAF_REMOTE_HOSTNAME,
16640N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED
16614N/A <
call function="'runSTAFCommand'">
16614N/A { 'name' : 'Extract OpenDS ZIP file',
16614N/A 'location' : STAF_REMOTE_HOSTNAME,
16560N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
16560N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED)
16505N/A <
call function="'checktestRC'">
16486N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
16347N/A <
message>'%s %s' % (c, p)</
message>
16347N/A { 'location' : STAF_REMOTE_HOSTNAME,
16155N/A 'name' : 'Launch setup command with JMX port conflict',
15700N/A <
call function="'testCase_Postamble'"/>
15528N/A #@TestMarker Setup-Uninstall ports Tests 15528N/A #@TestName Setup-Uninstall: Ports: 15528N/A #@TestID ldap-port-conflict-nocheck 15528N/A #@TestPurpose Setup OpenDS, disabling the LDAP port check 15474N/A #@TestStep Unzip OpenDS ZIP distribution 15474N/A Setup OpenDS with 'skipPortCheck' and 'doNotStart' 15449N/A #@TestResult PASS if all steps ran without errors 15448N/A <
testcase name="getTestCaseName('ldap-port-conflict-nocheck')">
15275N/A PORTS_I2_ROOT = '%s/%s' % (PORTS_I2_BASE, OPENDSNAME)
14503N/A <
call function="'testCase_Preamble'"/>
14464N/A <!-- 1. Setup options: baseDN baseDN sampleData --> 14420N/A <
message>'Prepare Open DS ZIP (in %s)' % PORTS_I2_ROOT</
message>
14420N/A <
call function="'runSTAFCommand'">
14185N/A { 'name' : 'Create directory to contain I2',
14185N/A 'location' : STAF_REMOTE_HOSTNAME,
13925N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % PORTS_I2_BASE
13754N/A <
call function="'checktestRC'">
13644N/A 'result' : 'FAIL to create directory',
13416N/A <
call function="'runSTAFCommand'">
13379N/A { 'name' : 'Extract OpenDS ZIP file',
13313N/A 'location' : STAF_REMOTE_HOSTNAME,
13300N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
13300N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I2_BASE)
12988N/A <
call function="'checktestRC'">
12571N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
12402N/A <
message>'%s %s' % (c, p)</
message>
12387N/A { 'location' : STAF_REMOTE_HOSTNAME,
12370N/A 'name' : 'Setup command for I2 (port conflict but nocheck)',
11826N/A <
message>'%s %s' % (c, p)</
message>
11819N/A { 'location' : STAF_REMOTE_HOSTNAME,
11819N/A 'name' : 'start DS (will raise port conflict)',
10986N/A <
message>'%s %s' % (c, p)</
message>
10980N/A { 'location' : STAF_REMOTE_HOSTNAME,
10861N/A <
call function="'testCase_Postamble'"/>
10704N/A #@TestMarker Setup-Uninstall ports Tests 10704N/A #@TestName Setup-Uninstall: Ports: 10640N/A #@TestID ldap-port-unauthorized 10640N/A #@TestPurpose Setup OpenDS, specifying a forbidden LDAP port 10615N/A #@TestStep Setup OpenDS with forbidden port number 10476N/A #@TestResult PASS if all steps ran without errors 10476N/A <
testcase name="getTestCaseName('ldap-port-unauthorized')">
10438N/A <
call function="'testCase_Preamble'"/>
10438N/A <
message>'Ports: Unauthorized LDAP port'</
message>
10436N/A <!-- Remove and recreate the unzipped instance --> 10418N/A <
call function="'runSTAFCommand'">
10418N/A { 'name' : 'Delete directory containing unzipped OpenDS',
10418N/A 'location' : STAF_REMOTE_HOSTNAME,
10418N/A 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED
10283N/A <
call function="'checktestRC'">
10169N/A 'result' : 'FAIL to remove files for this group at cleanup',
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Create directory to contain unzipped OpenDS',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Extract OpenDS ZIP file',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
10139N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED)
10139N/A <
call function="'checktestRC'">
10139N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
10139N/A <!-- This testcase is not relevant on Windows or as root user --> 10139N/A if is_windows_platform(STAF_REMOTE_HOSTNAME) or get_system_uid() == "root":
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'name' : 'Launch setup command with unauthorized LDAP port',
10139N/A <
message>'This testcase is not relevant on Windows or as root user'</
message>
10139N/A <
call function="'testCase_Postamble'"/>
10139N/A #@TestMarker Setup-Uninstall ports Tests 10139N/A #@TestName Setup-Uninstall: Ports: 10139N/A #@TestPurpose Uninstall the first instance 10139N/A #@TestStep Uninstall the first instance 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('uninstall')">
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <
message>'Ports: Uninstall the first instance'</
message>
10139N/A PORTS_I1_ROOT = '%s/%s' % (PORTS_I1_BASE, OPENDSNAME)
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A <
call function="'testCase_Postamble'"/>
10139N/A <
call function="'testSuite_Postamble'"/>