From 61abf57e1c7a2950f7bb9f403798725b38ed71fe Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Sun, 26 Aug 2007 00:50:01 +0000
Subject: [PATCH] schematokens fix for replication tests

---
 opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml b/opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml
index 740fa75..2220092 100644
--- a/opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml
+++ b/opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml
@@ -130,12 +130,14 @@
               <!-- Copy backup to "consumer" servers and restore it -->
               <paralleliterate var="consumer" in="consumerList">
                 <sequence>
-                  <call function="'copyFile'">
-                    { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
-                      'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
-                      'remotehost' : consumer.getHostname()
-                    }
-                  </call>
+                  <if expr="os.path.exists('%s/config/schematokens.dat' % dsPath)">
+                    <call function="'copyFile'">
+                      { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
+                        'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
+                        'remotehost' : consumer.getHostname()
+                      }
+                    </call>
+                  </if>
                   <call function="'CopyFolderByExtension'">
                     { 'location'   : masterHost,
                       'remotehost' : consumer.getHostname(),
@@ -257,12 +259,14 @@
               <!-- Copy backup to "consumer" servers and restore it -->
               <paralleliterate var="consumer" in="consumerList">
                 <sequence>
-                  <call function="'copyFile'">
-                    { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
-                      'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
-                      'remotehost' : consumer.getHostname()
-                    }
-                  </call>
+                  <if expr="os.path.exists('%s/config/schematokens.dat' % dsPath)">
+                    <call function="'copyFile'">
+                      { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
+                        'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
+                        'remotehost' : consumer.getHostname()
+                      }
+                    </call>
+                  </if>
                   <call function="'CopyFolderByExtension'">
                     { 'location'   : masterHost,
                       'remotehost' : consumer.getHostname(),

--
Gitblit v1.10.0