From 96a37235985f92b8c88a09f86fad5567feb867e5 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Mon, 09 Dec 2013 10:26:46 +0000
Subject: [PATCH] Updated privileges tests after fix for issue OPENDJ-1107 and fixed problem with jstack on Windows
---
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml | 41 ++++++++++++++++----
opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml | 6 ++
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml | 52 ++++++++++++++++++-------
3 files changed, 74 insertions(+), 25 deletions(-)
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml
index f767b5e..c5b85e2 100755
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml
@@ -115,13 +115,20 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'cannot be added due%sto insufficient access rights' % newLine
</script>
<call function="'searchString'">
- { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
- 'returnString' : resultString,
- 'knownIssue' : 'OPENDJ-1107'
- }
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
+ }
+ </call>
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
+ }
</call>
<message>
@@ -155,13 +162,20 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'cannot be added due%sto insufficient access rights' % newLine
</script>
- <call function="'searchString'">
- { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
- 'returnString' : resultString,
- 'knownIssue' : 'OPENDJ-1107'
- }
+ <call function="'searchString'">
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
+ }
+ </call>
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
+ }
</call>
<message>
@@ -242,12 +256,20 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'cannot be added due%sto insufficient access rights' % newLine
</script>
- <call function="'searchString'">
- { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
- 'returnString' : resultString
- }
+ <call function="'searchString'">
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
+ }
+ </call>
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
+ }
</call>
<call function="'testCase_Postamble'"/>
@@ -326,7 +348,7 @@
</script>
<call function="'searchString'">
- { 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF export',
+ { 'expectedString' : 'You do not have%ssufficient privileges to initiate an LDIF export' % newLine,
'returnString' : resultString
}
</call>
@@ -447,7 +469,7 @@
</script>
<call function="'searchString'">
- { 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF export',
+ { 'expectedString' : 'You do not have%ssufficient privileges to initiate an LDIF export' % newLine,
'returnString' : resultString
}
</call>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml
index 2a5f64a..6e5b03c 100755
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml
@@ -115,15 +115,22 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'cannot be added due%sto insufficient access rights' % newLine
</script>
<call function="'searchString'">
- { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
- 'returnString' : resultString ,
- 'knownIssue' : 'OPENDJ-1107'
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
}
</call>
-
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
+ }
+ </call>
+
<message>
'Privileges: Import Tasks: import-ldif, Admin adding privilege'
</message>
@@ -287,12 +294,20 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'You do not have%ssufficient privileges to initiate an LDIF import' % newLine
</script>
<call function="'searchString'">
- { 'returnString' : resultString ,
- 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF import'
- }
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
+ }
+ </call>
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
+ }
</call>
<message>
@@ -422,11 +437,19 @@
<script>
resultString = STAXResult[0][1]
+
+ msg1 = 'The server rejected the task for the following reason:'
+ msg2 = 'You do not have%ssufficient privileges to initiate an LDIF import' % newLine
</script>
<call function="'searchString'">
- { 'returnString' : resultString ,
- 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF import'
+ { 'expectedString' : msg1 ,
+ 'returnString' : resultString
+ }
+ </call>
+ <call function="'searchString'">
+ { 'expectedString' : msg2 ,
+ 'returnString' : resultString
}
</call>
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
index dc9156c..fe16c86 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
@@ -2203,8 +2203,12 @@
cmd = '%s/bin/jstack' % JAVA_HOME
env = ['JAVA_HOME=%s' % JAVA_HOME]
- cmdOptions = '-l %s' % pid
+ if is_windows_platform(location):
+ cmdOptions = '-l %s' % pidSTAXResult
+ else:
+ cmdOptions = '-l %s' % pid
+
outputPath = '%s/..' % (dsPath)
</script>
--
Gitblit v1.10.0