CR-1272 Fix for setup tests
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2008 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2013 ForgeRock AS |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | </call> |
| | | |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'CREATE', |
| | | 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to create directory', |
| | | } |
| | | </call> |
| | | |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Extract OpenDS ZIP file', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'ZIP', |
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2008 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2013 ForgeRock AS |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | <call function="'testCase_Preamble'"/> |
| | | <message>'Ports: LDAPS port conflict'</message> |
| | | |
| | | <!-- Remove and recreate the unzipped instance --> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Delete directory containing unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'DELETE', |
| | | 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to remove files for this group at cleanup', |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'CREATE', |
| | | 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Extract OpenDS ZIP file', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'ZIP', |
| | | 'request' : 'UNZIP', |
| | | 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \ |
| | | % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED) |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to unzip OpenDS ZIP file', |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt) |
| | | p = [] |
| | |
| | | <call function="'testCase_Preamble'"/> |
| | | <message>'Ports: JMX port conflict'</message> |
| | | |
| | | <!-- Remove and recreate the unzipped instance --> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Delete directory containing unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'DELETE', |
| | | 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to remove files for this group at cleanup', |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'CREATE', |
| | | 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Extract OpenDS ZIP file', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'ZIP', |
| | | 'request' : 'UNZIP', |
| | | 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \ |
| | | % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED) |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to unzip OpenDS ZIP file', |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt) |
| | | p = [] |
| | |
| | | <message>'Ports: '</message> |
| | | |
| | | <!-- 1. Setup options: baseDN baseDN sampleData --> |
| | | <message>'Prepare Open DS ZIP (in %s)' % PORTS_I1_ROOT</message> |
| | | <message>'Prepare Open DS ZIP (in %s)' % PORTS_I2_ROOT</message> |
| | | |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain I2', |
| | |
| | | 'name' : 'Setup command for I2 (port conflict but nocheck)', |
| | | 'command' : c, |
| | | 'arguments' : p, |
| | | 'path' : PORTS_I1_ROOT, |
| | | 'path' : PORTS_I2_ROOT, |
| | | 'expectedRC': 0, |
| | | 'outputFile': '%s/ports-setup-confl-nocheck-i2.txt' % OUT_GROUP, |
| | | } |
| | |
| | | 'name' : 'Uninstall I2', |
| | | 'command' : c, |
| | | 'arguments' : p, |
| | | 'path' : PORTS_I1_ROOT, |
| | | 'path' : PORTS_I2_ROOT, |
| | | 'expectedRC': 0, |
| | | 'outputFile': '%s/ports-uninstall-conflict-i2.txt' % OUT_GROUP, |
| | | } |
| | |
| | | <call function="'testCase_Preamble'"/> |
| | | <message>'Ports: Unauthorized LDAP port'</message> |
| | | |
| | | <!-- Remove and recreate the unzipped instance --> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Delete directory containing unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'DELETE', |
| | | 'arguments' : 'ENTRY %s RECURSE CONFIRM' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to remove files for this group at cleanup', |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'CREATE', |
| | | 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Extract OpenDS ZIP file', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'ZIP', |
| | | 'request' : 'UNZIP', |
| | | 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \ |
| | | % (DIRECTORY_INSTANCE_DIR, ZIPNAME, ODS_UNZIPPED) |
| | | } |
| | | </call> |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC, |
| | | 'expected' : 0, |
| | | 'result' : 'FAIL to unzip OpenDS ZIP file', |
| | | } |
| | | </call> |
| | | |
| | | <!-- This testcase is not relevant on Windows or as root user --> |
| | | <script> |
| | | from java.lang import System |
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2008-2009 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2013 ForgeRock AS |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | <call function="'getFreePort'"> |
| | | { |
| | | 'host' : STAF_REMOTE_HOSTNAME, |
| | | 'port' : 8524, |
| | | 'port' : 8554, |
| | | } |
| | | </call> |
| | | <script>SEC_I1_ADMIN_PORT = STAXResult</script> |
| | |
| | | <call function="'getFreePort'"> |
| | | { |
| | | 'host' : STAF_REMOTE_HOSTNAME, |
| | | 'port' : 8624, |
| | | 'port' : 8654, |
| | | } |
| | | </call> |
| | | <script>SEC_I2_ADMIN_PORT = STAXResult</script> |
| | |
| | | <script> |
| | | c = '%s/setup%s' % (SEC_I1_ROOT, fileExt) |
| | | p = [] |
| | | p.append('--cli --no-prompt --ldapPort %s' % (SEC_I1_PORT)) |
| | | p.append('--cli --hostname %s' % (STAF_REMOTE_HOSTNAME)) |
| | | p.append('--no-prompt --ldapPort %s' % (SEC_I1_PORT)) |
| | | p.append('--ldapsPort %s' % SEC_I1_SPORT) |
| | | p.append('--adminConnectorPort %s' % SEC_I1_ADMIN_PORT) |
| | | p.append('--rootUserDN "%s"' % DM_DN) |
| | |
| | | <script> |
| | | c = '%s/setup%s' % (SEC_I2_ROOT, fileExt) |
| | | p = [] |
| | | p.append('--cli --no-prompt --ldapPort %s' % (SEC_I2_PORT)) |
| | | p.append('--cli --hostname %s' % (STAF_REMOTE_HOSTNAME)) |
| | | p.append('--no-prompt --ldapPort %s' % (SEC_I2_PORT)) |
| | | p.append('--ldapsPort %s' % SEC_I2_SPORT) |
| | | p.append('--adminConnectorPort %s' % SEC_I2_ADMIN_PORT) |
| | | p.append('--rootUserDN "%s"' % DM_DN) |
| | |
| | | <script> |
| | | c = '%s/uninstall%s' % (SEC_I1_ROOT, fileExt) |
| | | p = [] |
| | | p.append('--cli --no-prompt') |
| | | p.append('--cli --referencedHostName %s' % STAF_REMOTE_HOSTNAME) |
| | | p.append('--adminUID admin --bindPassword %s' % DM_PW) |
| | | p.append('--remove-all') |
| | | p.append('--remove-all --no-prompt') |
| | | p.append('--trustStorePath %s' % MY_KEYSTORE) |
| | | p.append('--trustStorePassword secret12') |
| | | p = ' '.join(p) |
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2008 Sun Microsystems, Inc. |
| | | ! --> |
| | | ! Portions Copyright 2013 ForgeRock AS |
| | | ! --> |
| | | <stax> |
| | | |
| | | <defaultcall function="main_setup"/> |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'runSTAFCommand'"> |
| | | { 'name' : 'Create directory to contain unzipped OpenDS', |
| | | 'location' : STAF_REMOTE_HOSTNAME, |
| | | 'service' : 'FS', |
| | | 'request' : 'CREATE', |
| | | 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | testList = [] |
| | | testList.append(['.','_pre']) |