<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
|
<!--
|
! CDDL HEADER START
|
!
|
! The contents of this file are subject to the terms of the
|
! Common Development and Distribution License, Version 1.0 only
|
! (the "License"). You may not use this file except in compliance
|
! with the License.
|
!
|
! You can obtain a copy of the license at
|
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
|
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
|
! See the License for the specific language governing permissions
|
! and limitations under the License.
|
!
|
! When distributing Covered Code, exclude this CDDL HEADER in each
|
! file and exclude the License file at
|
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
|
! add the following below this CDDL HEADER, with the fields enclosed
|
! by brackets "[]" replaced with your own identifying information:
|
! Portions Copyright [yyyy] [name of copyright owner]
|
!
|
! CDDL HEADER END
|
!
|
! Copyright 2008 Sun Microsystems, Inc.
|
! -->
|
<stax>
|
|
<defaultcall function="directory_manager"/>
|
|
<function name="directory_manager">
|
|
<sequence>
|
|
<!--- Test Suite information
|
#@TestSuiteName Setup-Uninstall directory_manager Tests
|
#@TestSuitePurpose Test the various options regarding the creation
|
of the directory manager at setup time (DN,
|
password, ...
|
#@TestSuiteGroup directory_manager
|
#@TestSuiteID directory_manager Tests
|
#@TestGroup Setup-Uninstall
|
#@TestScript directory_manager.xml
|
#@TestHTMLLink http://opends.dev.java.net/
|
-->
|
|
<script>
|
if not CurrentTestPath.has_key('group'):
|
CurrentTestPath['group'] = 'setup'
|
CurrentTestPath['suite'] = 'directory_manager'
|
</script>
|
|
<call function="'testSuite_Preamble'"/>
|
|
<call function="'getFreePort'">
|
{
|
'host' : STAF_REMOTE_HOSTNAME,
|
'port' : 5000,
|
}
|
</call>
|
<script>DM_I1_PORT = STAXResult</script>
|
|
<call function="'getFreePort'">
|
{
|
'host' : STAF_REMOTE_HOSTNAME,
|
'port' : 6000,
|
}
|
</call>
|
<script>DM_I2_PORT = STAXResult</script>
|
|
<call function="'getFreePort'">
|
{
|
'host' : STAF_REMOTE_HOSTNAME,
|
'port' : 6500,
|
}
|
</call>
|
<script>DM_I3_PORT = STAXResult</script>
|
|
<call function="'getFreePort'">
|
{
|
'host' : STAF_REMOTE_HOSTNAME,
|
'port' : 7000,
|
}
|
</call>
|
<script>DM_I1_REPLICATION_PORT = STAXResult</script>
|
|
<call function="'getFreePort'">
|
{
|
'host' : STAF_REMOTE_HOSTNAME,
|
'port' : 8000,
|
}
|
</call>
|
<script>DM_I2_REPLICATION_PORT = STAXResult</script>
|
|
<message>
|
'Got these free ports: %s, %s, %s, %s and %s' % \
|
(DM_I1_PORT, DM_I2_PORT, DM_I3_PORT, DM_I1_REPLICATION_PORT, \
|
DM_I2_REPLICATION_PORT)
|
</message>
|
|
|
<!--- Test Case information
|
#@TestMarker Setup-Uninstall Directory Manager options
|
#@TestName Setup-Uninstall: directory_manager:
|
setup_uninstall_directory_manager_pwd
|
#@TestID setup_uninstall_directory_manager_pwd
|
#@TestPurpose Test "directory manager" related setup options
|
#@TestPreamble
|
#@TestStep Setup OpenDS instance 1 using specific DM options
|
Setup OpenDS instance 2 using specific DM options
|
Setup replication between 1&2 on suffix o=o1
|
Backup instances 1&2
|
Uninstall instance 1 with specific options
|
Uninstall instance 2 with specific options
|
#@TestPostamble
|
#@TestResult PASS if all steps ran without errors
|
-->
|
<testcase name="getTestCaseName('setup_uninstall_directory_manager_pwd')">
|
<sequence>
|
|
<script>
|
DM_I1_BASE = '%s/dm_i1' % (OUT_GROUP)
|
DM_I1_ROOT = '%s/%s' % (DM_I1_BASE, OPENDSNAME)
|
DM_I2_BASE = '%s/dm_i2' % (OUT_GROUP)
|
DM_I2_ROOT = '%s/%s' % (DM_I2_BASE, OPENDSNAME)
|
DM_O1_LDIF = '%s/setup/dm-o1.ldif' % logsRemoteDataDir
|
</script>
|
|
|
<call function="'testCase_Preamble'"/>
|
<message>'Setup Uninstall: Directory manager options'</message>
|
|
<!-- 1. Setup I1: rootUserPassword "kangourou" -->
|
|
<message>'Prepare Open DS ZIP (in %s)' % DM_I1_ROOT</message>
|
|
<call function="'runSTAFCommand'">
|
{ 'name' : 'Create directory to contain I1',
|
'location' : STAF_REMOTE_HOSTNAME,
|
'service' : 'FS',
|
'request' : 'CREATE',
|
'arguments' : 'DIRECTORY %s FAILIFEXISTS' % DM_I1_BASE
|
}
|
</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',
|
'request' : 'UNZIP',
|
'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
|
% (ZIPPATH, ZIPNAME, DM_I1_BASE)
|
}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC,
|
'expected' : 0,
|
'result' : 'FAIL to unzip OpenDS ZIP file',
|
}
|
</call>
|
|
<script>
|
c = '%s/setup%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt --ldapPort %s' % (DM_I1_PORT))
|
p.append('--rootUserPassword "kangourou"')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Launch setup command for I1',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-setup-i1.txt' % OUT_GROUP,
|
}
|
</call>
|
|
|
<!-- 2. Setup I2: rootUserDN "cn=DM" rootUserPassword "kangourou" -->
|
<message>'Prepare Open DS ZIP (in %s)' % DM_I2_ROOT</message>
|
|
<call function="'runSTAFCommand'">
|
{ 'name' : 'Create directory to contain I2',
|
'location' : STAF_REMOTE_HOSTNAME,
|
'service' : 'FS',
|
'request' : 'CREATE',
|
'arguments' : 'DIRECTORY %s FAILIFEXISTS' % DM_I2_BASE
|
}
|
</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',
|
'request' : 'UNZIP',
|
'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
|
% (ZIPPATH, ZIPNAME, DM_I2_BASE)
|
}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC,
|
'expected' : 0,
|
'result' : 'FAIL to unzip OpenDS ZIP file',
|
}
|
</call>
|
|
<script>
|
c = '%s/setup%s' % (DM_I2_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt --ldapPort %s' % (DM_I2_PORT))
|
p.append('--rootUserDN "cn=DM" --rootUserPassword "kangourou"')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Launch setup command for I2',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I2_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-setup-i2.txt' % OUT_GROUP,
|
}
|
</call>
|
|
|
|
|
<!-- 3. Configure replication between I1 & I2 on o=o1. Global Admin
|
is setup -->
|
<message>'Configure replication between I1 - I2 on o=o1'</message>
|
<script>
|
c = '%s/bin/dsconfig%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('create-backend --bindDN "cn=directory manager"')
|
p.append('--bindPassword kangourou --port %s' % (DM_I1_PORT))
|
p.append('--backend-name o1 --type local-db --no-prompt')
|
p.append('--set enabled:true --set writability-mode:enabled')
|
p.append('--set base-dn:"o=o1"')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Create backend on I1',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-create-backend-i1.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
c = '%s/bin/dsconfig%s' % (DM_I2_ROOT, fileExt)
|
p = []
|
p.append('create-backend --bindDN "cn=DM" --bindPassword kangourou')
|
p.append('--port %s --backend-name o1' % DM_I2_PORT)
|
p.append('--type local-db --no-prompt --set enabled:true')
|
p.append('--set writability-mode:enabled --set base-dn:"o=o1"')
|
p.append('')
|
p.append('')
|
p.append('')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Create backend on I2',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I2_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-create-backend-i2.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
c = '%s/bin/import-ldif%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('--bindDN "cn=directory manager" --bindPassword kangourou')
|
p.append('--port %s --backendID o1' % DM_I1_PORT)
|
p.append('--ldifFile %s' % DM_O1_LDIF)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Import data on I1',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-import-ldif-i1.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
c = '%s/bin/dsreplication%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('enable --host1 %s' % STAF_REMOTE_HOSTNAME)
|
p.append('--bindDN1 "cn=directory manager"')
|
p.append('--bindPassword1 kangourou')
|
p.append('--port1 %s' % DM_I1_PORT)
|
p.append('--replicationPort1 %s' % DM_I1_REPLICATION_PORT)
|
p.append('--host2 %s --bindDN2 "cn=DM"' % STAF_REMOTE_HOSTNAME)
|
p.append('--bindPassword2 kangourou')
|
p.append('--port2 %s' % (DM_I2_PORT))
|
p.append('--replicationPort2 %s' % DM_I2_REPLICATION_PORT)
|
p.append('-I admin -w secret12')
|
p.append('--baseDN "o=o1" --no-prompt')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Enable I1 - I2 replication',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-enable-repl.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
c = '%s/bin/dsreplication%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('initialize -I admin -w secret12 --baseDN "o=o1"')
|
p.append('--hostSource %s' % STAF_REMOTE_HOSTNAME)
|
p.append('--portSource %s' % DM_I1_PORT)
|
p.append('--hostDestination %s' % STAF_REMOTE_HOSTNAME)
|
p.append('--portDestination %s' % DM_I2_PORT)
|
p.append('--no-prompt')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Initialize I1 - I2 replication',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-initialize-repl.txt' % OUT_GROUP,
|
}
|
</call>
|
|
|
<!-- 4. Backup I1 & I2 and copy LDIF files in I1 & I2 -->
|
<message>'Backup I1 and I2 - copy LDIF files in I1 and I2'</message>
|
<script>
|
c = '%s/bin/backup%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('--backendID o1 --port %s' % DM_I1_PORT)
|
p.append('--bindDN "cn=directory manager"')
|
p.append('--bindPassword "kangourou"')
|
p.append('--backupDirectory %s/bak' % DM_I1_ROOT)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Backup I1',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-backup-i1.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
c = '%s/bin/backup%s' % (DM_I2_ROOT, fileExt)
|
p = []
|
p.append('--backendID o1 --port %s' % DM_I2_PORT)
|
p.append('--bindDN "cn=DM" --bindPassword "kangourou"')
|
p.append('--backupDirectory %s/bak' % DM_I2_ROOT)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Backup I2',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I2_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-backup-i2.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<script>
|
ldifDir = '%s/ldif' % (DM_I1_ROOT)
|
ldifFile = '%s' % DM_O1_LDIF
|
</script>
|
|
<call function="'runSTAFCommand'">
|
{ 'name' : 'Copy LDIF file in I1',
|
'location' : STAF_REMOTE_HOSTNAME,
|
'service' : 'FS',
|
'request' : 'COPY',
|
'arguments' : 'FILE %s TODIRECTORY %s' % (ldifFile, ldifDir)
|
}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC,
|
'expected' : 0,
|
'result' : 'FAIL to copy LDIF file for I1',
|
}
|
</call>
|
|
<script>
|
ldifDir = '%s/ldif' % (DM_I2_ROOT)
|
ldifFile = '%s' % DM_O1_LDIF
|
</script>
|
|
<call function="'runSTAFCommand'">
|
{ 'name' : 'Copy LDIF file in I2',
|
'location' : STAF_REMOTE_HOSTNAME,
|
'service' : 'FS',
|
'request' : 'COPY',
|
'arguments' : 'FILE %s TODIRECTORY %s' % (ldifFile, ldifDir)
|
}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC,
|
'expected' : 0,
|
'result' : 'FAIL to copy LDIF file for I2',
|
}
|
</call>
|
|
<!-- 5. Uninstall I1: referencedHostTestcase adminUID bindPassword
|
configuration-files databases log-files server-libraries -->
|
<message>'Uninstall I1'</message>
|
<script>
|
c = '%s/uninstall%s' % (DM_I1_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt')
|
p.append('--adminUID admin --bindPassword secret12')
|
p.append('--configuration-files')
|
p.append('--databases')
|
p.append('--log-files')
|
p.append('--server-libraries')
|
p.append('--referencedHostName %s' % STAF_REMOTE_HOSTNAME)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Uninstall I1',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I1_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-uninstall-i1.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<!-- 6. Uninstall I2: <no credentials given> -->
|
<message>'Uninstall I2, no credentials given'</message>
|
<script>
|
c = '%s/uninstall%s' % (DM_I2_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt')
|
p.append('--remove-all')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Uninstall I2 (should fail)',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I2_ROOT,
|
'expectedRC': 2,
|
'outputFile': '%s/dm-uninstall-i2-fail.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<!-- 7. Uninstall I2: referencedHostTestcase adminUID bindPassword
|
backup-files ldif-files -->
|
<message>'Uninstall I2'</message>
|
<script>
|
c = '%s/uninstall%s' % (DM_I2_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt')
|
p.append('--adminUID admin --bindPassword secret12')
|
p.append('--backup-files')
|
p.append('--ldif-files')
|
p.append('--referencedHostName %s' % STAF_REMOTE_HOSTNAME)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Uninstall I2 (should pass)',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I2_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-uninstall-i2-pass.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/bak' % DM_I1_ROOT }
|
</call>
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/ldif' % DM_I1_ROOT }
|
</call>
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/bin' % DM_I1_ROOT }
|
</call>
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/config' % DM_I1_ROOT }
|
</call>
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/db' % DM_I1_ROOT }
|
</call>
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/logs' % DM_I1_ROOT }
|
</call>
|
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/bak' % DM_I2_ROOT }
|
</call>
|
<call function="'checkFileNotExists'">
|
{ 'file' : '%s/ldif' % DM_I2_ROOT }
|
</call>
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/bin' % DM_I2_ROOT }
|
</call>
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/config' % DM_I2_ROOT }
|
</call>
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/db' % DM_I2_ROOT }
|
</call>
|
<call function="'checkFileExists'">
|
{ 'file' : '%s/logs' % DM_I2_ROOT }
|
</call>
|
|
|
<call function="'testCase_Postamble'"/>
|
|
|
</sequence>
|
</testcase>
|
|
<!--- Test Case information
|
#@TestMarker Setup-Uninstall Directory Manager options
|
#@TestName Setup-Uninstall: directory_manager:
|
dirmgr_pwd_and_resetup
|
#@TestID dirmgr_pwd_and_resetup
|
#@TestPurpose Test "directory manager" related setup options
|
(error case)
|
#@TestPreamble
|
#@TestStep Setup OpenDS instance specifying a wrong
|
path for password file (lead to error)
|
Setup OpenDS instance in quiet mode
|
Uninstall instance
|
#@TestPostamble
|
#@TestResult PASS if all steps ran without errors
|
-->
|
<testcase name="getTestCaseName('dirmgr_pwd_and_resetup')">
|
<sequence>
|
|
<script>
|
DM_I3_BASE = '%s/dm_i3' % (OUT_GROUP)
|
DM_I3_ROOT = '%s/%s' % (DM_I3_BASE, OPENDSNAME)
|
DM_PASSWD_FILE = '%s/setup/pwd.ldif' % logsRemoteDataDir
|
</script>
|
|
<call function="'testCase_Preamble'"/>
|
<message>'Setup: Directory manager password error'</message>
|
|
|
<!-- 1. Setup options: rootUserDN "cn=DM" rootUserPasswordFile
|
"/does/not/exist" -->
|
<message>'Prepare Open DS ZIP (in %s)' % DM_I1_ROOT</message>
|
|
<call function="'runSTAFCommand'">
|
{ 'name' : 'Create directory to contain I3',
|
'location' : STAF_REMOTE_HOSTNAME,
|
'service' : 'FS',
|
'request' : 'CREATE',
|
'arguments' : 'DIRECTORY %s FAILIFEXISTS' % DM_I3_BASE
|
}
|
</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',
|
'request' : 'UNZIP',
|
'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
|
% (ZIPPATH, ZIPNAME, DM_I3_BASE)
|
}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC,
|
'expected' : 0,
|
'result' : 'FAIL to unzip OpenDS ZIP file',
|
}
|
</call>
|
|
<script>
|
c = '%s/setup%s' % (DM_I3_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt --rootUserDN "cn=DM"')
|
p.append('--rootUserPasswordFile %s/does-not-exist.txt' % OUT_GROUP)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Launch setup command for I3 (should fail)',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I3_ROOT,
|
'expectedRC': 2,
|
'outputFile': '%s/dm-setup-i3-fail.txt' % OUT_GROUP,
|
}
|
</call>
|
|
|
<!-- 2. Setup options: rootUserDN "cn=DM" rootUserPasswordFile
|
"/does/exist" quiet -->
|
<message>'Setup'</message>
|
<script>
|
c = '%s/setup%s' % (DM_I3_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt --rootUserDN "cn=DM" --quiet')
|
p.append('--rootUserPasswordFile %s' % DM_PASSWD_FILE)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Launch setup command for I3',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I3_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-setup-i3-pass.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<!-- 3. Setup options: relaunch setup command -->
|
<message>'Setup options: relaunch setup command'</message>
|
<script>
|
c = '%s/setup%s' % (DM_I3_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt --rootUserDN "cn=DM"')
|
p.append('--rootUserPassword "kangourou"')
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Re-launch setup command for I3 (should fail)',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I3_ROOT,
|
'expectedRC': 3,
|
'outputFile': '%s/dm-re-setup-i3.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<!-- 4. Uninstall options: -->
|
<script>
|
c = '%s/uninstall%s' % (DM_I3_ROOT, fileExt)
|
p = []
|
p.append('--cli --no-prompt')
|
p.append('--remove-all')
|
p.append('--referencedHostName %s' % STAF_REMOTE_HOSTNAME)
|
p = ' '.join(p)
|
</script>
|
|
<message>'%s %s' % (c, p)</message>
|
<call function="'runCommand'">
|
{ 'location' : STAF_REMOTE_HOSTNAME,
|
'name' : 'Uninstall I3',
|
'command' : c,
|
'arguments' : p,
|
'path' : DM_I3_ROOT,
|
'expectedRC': 0,
|
'outputFile': '%s/dm-uninstall-i3.txt' % OUT_GROUP,
|
}
|
</call>
|
|
<call function="'testCase_Postamble'"/>
|
|
</sequence>
|
</testcase>
|
|
<call function="'testSuite_Postamble'"/>
|
|
</sequence>
|
|
</function>
|
|
</stax>
|