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 15894N/A ! (the "License"). You may not use this file except in compliance 17178N/A ! You can obtain a copy of the license at 10139N/A ! See the License for the specific language governing permissions 10139N/A ! and limitations under the License. 10139N/A ! When distributing Covered Code, exclude this CDDL HEADER in each 10139N/A ! file and exclude the License file at 10139N/A ! add the following below this CDDL HEADER, with the fields enclosed 10139N/A ! by brackets "[]" replaced with your own identifying information: 16920N/A ! Portions Copyright [yyyy] [name of copyright owner] 10142N/A ! Copyright 2008 Sun Microsystems, Inc. 12773N/A ! Portions Copyright 2013 ForgeRock AS 15440N/A <
defaultcall function="ports"/>
10139N/A #@TestSuiteName Setup-Uninstall ports Tests 12796N/A #@TestSuitePurpose Test all port relative setup and uninstall 10139N/A options (port conflict, access right on port, 14181N/A CurrentTestPath['group'] = 'setup'
14181N/A CurrentTestPath['suite'] = 'ports'
14181N/A <
call function="'testSuite_Preamble'"/>
14181N/A <
call function="'getFreePort'">
17108N/A <
script>PORTS_I1_PORT = STAXResult</
script>
17165N/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>
10139N/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: 10139N/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,
10139N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
10139N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I1_BASE)
10139N/A <
call function="'checktestRC'">
10139N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
14181N/A <
message>'%s %s' % (c, p)</
message>
17108N/A { 'location' : STAF_REMOTE_HOSTNAME,
17165N/A 'name' : 'Setup a first instance to bind a port',
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 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>
12773N/A <
message>'%s %s' % (c, p)</
message>
12773N/A { 'location' : STAF_REMOTE_HOSTNAME,
12773N/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'">
10139N/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,
17108N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
17108N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED)
16852N/A <
call function="'checktestRC'">
16484N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
15559N/A <
message>'%s %s' % (c, p)</
message>
15448N/A { 'location' : STAF_REMOTE_HOSTNAME,
15440N/A 'name' : 'Launch setup command with LDAPS port conflict',
14497N/A <
call function="'testCase_Postamble'"/>
13663N/A #@TestMarker Setup-Uninstall ports Tests 13663N/A #@TestName Setup-Uninstall: Ports: 13424N/A #@TestPurpose Setup OpenDS, specifying a used JMX port 13329N/A #@TestStep Setup OpenDS, specifying a used JMX port 13329N/A #@TestResult PASS if all steps ran without errors 13058N/A <
testcase name="getTestCaseName('jmx-port-conflict')">
12998N/A <
call function="'testCase_Preamble'"/>
12987N/A <
message>'Ports: JMX port conflict'</
message>
12825N/A <!-- Remove and recreate the unzipped instance --> 12825N/A <
call function="'runSTAFCommand'">
12775N/A { 'name' : 'Delete directory containing unzipped OpenDS',
12775N/A 'location' : STAF_REMOTE_HOSTNAME,
12629N/A 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED
12586N/A <
call function="'checktestRC'">
12467N/A 'result' : 'FAIL to remove files for this group at cleanup',
12288N/A <
call function="'runSTAFCommand'">
12288N/A { 'name' : 'Create directory to contain unzipped OpenDS',
12246N/A 'location' : STAF_REMOTE_HOSTNAME,
12215N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED
12158N/A <
call function="'runSTAFCommand'">
12158N/A { 'name' : 'Extract OpenDS ZIP file',
12158N/A 'location' : STAF_REMOTE_HOSTNAME,
12142N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
12158N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED)
12142N/A <
call function="'checktestRC'">
12125N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
11419N/A <
message>'%s %s' % (c, p)</
message>
11252N/A { 'location' : STAF_REMOTE_HOSTNAME,
11115N/A 'name' : 'Launch setup command with JMX port conflict',
10921N/A <
call function="'testCase_Postamble'"/>
10637N/A #@TestMarker Setup-Uninstall ports Tests 10637N/A #@TestName Setup-Uninstall: Ports: 10454N/A #@TestID ldap-port-conflict-nocheck 10264N/A #@TestPurpose Setup OpenDS, disabling the LDAP port check 10176N/A #@TestStep Unzip OpenDS ZIP distribution 10176N/A Setup OpenDS with 'skipPortCheck' and 'doNotStart' 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('ldap-port-conflict-nocheck')">
10139N/A PORTS_I2_ROOT = '%s/%s' % (PORTS_I2_BASE, OPENDSNAME)
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <!-- 1. Setup options: baseDN baseDN sampleData --> 10139N/A <
message>'Prepare Open DS ZIP (in %s)' % PORTS_I2_ROOT</
message>
10139N/A <
call function="'runSTAFCommand'">
10139N/A { 'name' : 'Create directory to contain I2',
10139N/A 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % PORTS_I2_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,
10139N/A 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
10139N/A % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I2_BASE)
10139N/A <
call function="'checktestRC'">
10139N/A 'result' : 'FAIL to unzip OpenDS ZIP file',
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'name' : 'Setup command for I2 (port conflict but nocheck)',
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A 'name' : 'start DS (will raise port conflict)',
10139N/A <
message>'%s %s' % (c, p)</
message>
10139N/A { 'location' : STAF_REMOTE_HOSTNAME,
10139N/A <
call function="'testCase_Postamble'"/>
10139N/A #@TestMarker Setup-Uninstall ports Tests 10139N/A #@TestName Setup-Uninstall: Ports: 10139N/A #@TestID ldap-port-unauthorized 10139N/A #@TestPurpose Setup OpenDS, specifying a forbidden LDAP port 10139N/A #@TestStep Setup OpenDS with forbidden port number 10139N/A #@TestResult PASS if all steps ran without errors 10139N/A <
testcase name="getTestCaseName('ldap-port-unauthorized')">
10139N/A <
call function="'testCase_Preamble'"/>
10139N/A <
message>'Ports: Unauthorized LDAP port'</
message>
10139N/A <!-- Remove and recreate the unzipped instance --> 10139N/A <
call function="'runSTAFCommand'">
10139N/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)
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'"/>