From 7e395adaf0e084df2cf1dca02e7c025e1488b73a Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 04 Mar 2008 10:15:17 +0000
Subject: [PATCH] Fix importLdifTask() : add expectedRC parameter
---
opends/tests/shared/functions/dsadm.xml | 44 +++++++++++++++++++++++++++++++-------------
1 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/opends/tests/shared/functions/dsadm.xml b/opends/tests/shared/functions/dsadm.xml
index c591456..e9953c3 100755
--- a/opends/tests/shared/functions/dsadm.xml
+++ b/opends/tests/shared/functions/dsadm.xml
@@ -1123,6 +1123,13 @@
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
+ <function-arg-def name="expectedRC" type="optional" default="0">
+ <function-arg-description>
+ Expected return code value. Default value is 0
+ Wildcard 'noCheck' to not check the RC
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
</function-map-args>
<sequence>
@@ -1208,7 +1215,9 @@
'dsPort' : dsInstancePort,
'dsBindDn' : dsInstanceDn,
'dsBindPswd' : dsInstancePswd,
- 'dsTaskLdif' : taskLdif }
+ 'dsTaskLdif' : taskLdif,
+ 'expectedRC' : expectedRC
+ }
</call>
<script>
@@ -1229,6 +1238,11 @@
'noOfLoops' : numLdapCheckTries,
'sleepMilliSeconds' : sleepBetweenLdapCheckTries }
</call>
+ <message>'Check CheckLdapTask returns RC=0'</message>
+ <call function="'checktestRC'">
+ { 'returncode' : RC ,
+ 'result' : STAXResult }
+ </call>
</sequence>
</if>
@@ -3084,6 +3098,12 @@
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
+ <function-arg-def name="expectedRC" type="optional" default="0">
+ <function-arg-description>
+ Expected return code value. Default value is 0.
+ Wildcard 'noCheck' to not check the RC
+ </function-arg-description>
+ </function-arg-def>
</function-map-args>
<sequence>
@@ -3142,9 +3162,11 @@
STAFCmdResult=STAXResult
</script>
- <call function="'checkRC'">
- { 'returncode' : STAFCmdRC ,
- 'result' : STAFCmdResult }
+ <call function="'checktestRC'">
+ { 'returncode' : STAFCmdRC,
+ 'result' : STAFCmdResult,
+ 'expected' : expectedRC
+ }
</call>
<return>[STAFCmdRC, STAFCmdResult[0][1]]</return>
@@ -3278,10 +3300,11 @@
<!-- Search for task status -->
<call function="'runCommand'">
- { 'name' : 'Search On line Import Task',
- 'command' : STAFCmd,
- 'arguments' : STAFCmdParams,
- 'location' : myLocation
+ { 'name' : 'Search On line Import Task',
+ 'command' : STAFCmd,
+ 'arguments' : STAFCmdParams,
+ 'location' : myLocation,
+ 'expectedRC' : 'noCheck'
}
</call>
@@ -3313,11 +3336,6 @@
</message>
</else>
</if>
-
- <call function="'checkRC'">
- { 'returncode' : STAFCmdRC ,
- 'result' : STAFCmdResult }
- </call>
<message>
'Sleeping for %s ms' % sleepMilliSeconds
--
Gitblit v1.10.0