From 12bf9252673514f10d82a1955b9e68fa00f4de33 Mon Sep 17 00:00:00 2001
From: Gary Williams <gary.williams@forgerock.com>
Date: Sat, 20 Oct 2012 12:48:28 +0000
Subject: [PATCH] Ensure instance and data is fully removed before new functional tests run

---
 opends/tests/staf-tests/shared/functions/topology.xml |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/opends/tests/staf-tests/shared/functions/topology.xml b/opends/tests/staf-tests/shared/functions/topology.xml
index 1e043ff..53b4b23 100755
--- a/opends/tests/staf-tests/shared/functions/topology.xml
+++ b/opends/tests/staf-tests/shared/functions/topology.xml
@@ -348,23 +348,23 @@
     
     <sequence>
       <message>
-        'Create instance in host %s at directory %s' % (dsHost,dsDir)
+        'Create an instance on remote host %s' % dsHost
       </message>
       
       <!-- ON REMOTE HOST: copy files, unzip, configure instance -->
       <!--- Delete folder if it exists on remote host-->
       <message>
-        'Delete folder %s/%s on host %s' % (dsDir,OPENDSNAME,dsHost)
+        'Delete existing instance folder %s on remote host %s' % (dsDir,dsHost)
       </message>
       <call function="'deleteFolder'">
         { 'location'   : dsHost, 
-          'foldername' : '%s/%s' % (dsDir,OPENDSNAME)
+          'foldername' : '%s' % (dsDir)
         }
       </call>
       
       <!--- Create folder on remote host -->
       <message>
-        'Create folder %s on host %s' % (dsDir,dsHost)
+        'Create new instance folder %s on remote host %s' % (dsDir,dsHost)
       </message>
       <call function="'createFolder'">
         { 'location'   : dsHost, 
@@ -372,10 +372,19 @@
         }
       </call>
 
+      <!--- Delete temporary folder on remote host -->
+      <message>
+        'Delete temporary folder %s/temp on remote host' % dsDir
+      </message>
+      <call function="'deleteFolder'">
+        { 'location'   : dsHost,
+          'foldername' : '%s/temp' % dsDir
+        }
+      </call>
       
       <!--- Delete staging data folder on remote host -->
       <message>
-        'Delete staging data folder %s/shared' % dsDir
+        'Delete staging data folder %s/testdata on remote host' % dsDir
       </message>
       <call function="'deleteFolder'">
         { 'location'   : dsHost,
@@ -385,7 +394,8 @@
             
       <!---   Copy staging data to remote host -->
       <message>
-        'Copy %s/testdata.zip to %s on %s' % (local.testdata,dsDir,dsHost)
+        'Copy %s/testdata.zip to %s on %s on remote host' \
+          % (local.testdata,dsDir,dsHost)
       </message>
       <call function="'copyFile'">
         { 'srcfile'    : '%s/testdata.zip' % local.temp,
@@ -396,7 +406,8 @@
       
       <!---   Unzip contents of staging data on remote host -->
       <message>
-        'Extract contents of test data %s on %s' % (dsDir,dsHost)
+        'Extract contents of test data %s on %s on remote host' \
+          % (dsDir,dsHost)
       </message>
       <call function="'unZipFile'">
         { 'location' : dsHost, 

--
Gitblit v1.10.0