From 3a274dfdf0200347f54e452c79e997c4a297d36c Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Thu, 23 Aug 2007 19:08:55 +0000
Subject: [PATCH] fix indexes tests commands

---
 opends/tests/functional-tests/testcases/indexes/indexes.xml |    8 ++++----
 opends/tests/functional-tests/shared/functions/tools.xml    |   15 ++++++++++++++-
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/opends/tests/functional-tests/shared/functions/tools.xml b/opends/tests/functional-tests/shared/functions/tools.xml
index 07442f9..ec04e52 100644
--- a/opends/tests/functional-tests/shared/functions/tools.xml
+++ b/opends/tests/functional-tests/shared/functions/tools.xml
@@ -676,6 +676,18 @@
       This wraps the rebuild-index tool to make it easy to use from STAX
     </function-prolog>
     <function-map-args>
+      <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
+        <function-arg-description>
+          Location of target host
+        </function-arg-description>
+        <function-arg-property name="type" value="hostname"/>
+      </function-arg-def>
+      <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+        <function-arg-description>
+          Pathname to installation root
+        </function-arg-description>
+        <function-arg-property name="type" value="filepath"/>
+      </function-arg-def>          
       <function-arg-def name="baseDN" type="required">
         <function-arg-description>
           Specify a back-end supporting indexing and triggers a rebuild of all 
@@ -693,13 +705,14 @@
     
     <sequence>
       <script>
+        dsBinPath='%s/%s' % (dsPath,fileFolder)        
         _cmd='%s/rebuild-index%s' % (dsBinPath,fileExt)
         _args=' -b %s -i %s' % ( baseDN, ' -i '.join(attributes) )
       </script>
       <call function="'runCommand'">
         { 'name'      : 'rebuild index',
           'location'  : location,
-          'command'   : cmd,
+          'command'   : _cmd,
           'arguments' : _args
         }
       </call>
diff --git a/opends/tests/functional-tests/testcases/indexes/indexes.xml b/opends/tests/functional-tests/testcases/indexes/indexes.xml
index e01fc3c..8c4dee6 100644
--- a/opends/tests/functional-tests/testcases/indexes/indexes.xml
+++ b/opends/tests/functional-tests/testcases/indexes/indexes.xml
@@ -132,7 +132,7 @@
               { 'functionName'      : 'StopDsWithScript'               ,
                 'functionException' : 'CLI.stop-ds'                    ,
                 'functionFailureTC' : 'Indexes - Modify' ,
-                'functionArguments' : { 'location'  : STAF_LOCAL_HOSTNAME   ,
+                'functionArguments' : { 'location'  : STAF_REMOTE_HOSTNAME   ,
                                         'dsHost'    : DIRECTORY_INSTANCE_HOST,
                                         'dsPort'    : DIRECTORY_INSTANCE_PORT,
                                         'dsBindDN'  : DIRECTORY_INSTANCE_DN  ,
@@ -151,7 +151,7 @@
               { 'functionName'      : 'StartDsWithScript',
                 'functionException' : 'CLI.start-ds'     ,
                 'functionFailureTC' : 'Indexes - Modify' ,
-                'functionArguments' : { 'location' : STAF_LOCAL_HOSTNAME }
+                'functionArguments' : { 'location' : STAF_REMOTE_HOSTNAME }
               }
             </call>
             <call function="'loopThroughFilters'">
@@ -206,7 +206,7 @@
               { 'functionName'      : 'StopDsWithScript' ,
                 'functionException' : 'CLI.stop-ds'      ,
                 'functionFailureTC' : '%s: %s: %s' % (CurrentTestPath['group'], CurrentTestPath['suite'], STAXCurrentBlock ) ,
-                'functionArguments' : { 'location'  : STAF_LOCAL_HOSTNAME    ,
+                'functionArguments' : { 'location'  : STAF_REMOTE_HOSTNAME    ,
                                         'dsHost'    : DIRECTORY_INSTANCE_HOST,
                                         'dsPort'    : DIRECTORY_INSTANCE_PORT,
                                         'dsBindDN'  : DIRECTORY_INSTANCE_DN  ,
@@ -227,7 +227,7 @@
               { 'functionName'      : 'StartDsWithScript',
                 'functionException' : 'CLI.start-ds'     ,
                 'functionFailureTC' : '%s: %s:  ' ,
-                'functionArguments' : { 'location' : STAF_LOCAL_HOSTNAME }
+                'functionArguments' : { 'location' : STAF_REMOTE_HOSTNAME }
               }
             </call>
             <call function="'loopThroughFilters'">

--
Gitblit v1.10.0