From eeb5b0e4faafefa30be9a66a44b34d0ee4533643 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 28 May 2013 15:32:52 +0000
Subject: [PATCH] CR-1750 Updated expected result for dsml/searchfilter_substringsnosubfilter test and fixed jython exception in SNMP tests

---
 opends/tests/staf-tests/functional-tests/shared/data/dsml/suites/03dsmlerrsuite/data/searchfilter_substringsnosubfilter.res |    2 +-
 opends/tests/staf-tests/functional-tests/testcases/snmp/basic/snmp_basic_tests.xml                                          |   24 ++++++++++++++++++------
 opends/tests/staf-tests/shared/functions/utils.xml                                                                          |    8 +++++++-
 3 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/opends/tests/staf-tests/functional-tests/shared/data/dsml/suites/03dsmlerrsuite/data/searchfilter_substringsnosubfilter.res b/opends/tests/staf-tests/functional-tests/shared/data/dsml/suites/03dsmlerrsuite/data/searchfilter_substringsnosubfilter.res
index 9cd747b..aeb2bda 100755
--- a/opends/tests/staf-tests/functional-tests/shared/data/dsml/suites/03dsmlerrsuite/data/searchfilter_substringsnosubfilter.res
+++ b/opends/tests/staf-tests/functional-tests/shared/data/dsml/suites/03dsmlerrsuite/data/searchfilter_substringsnosubfilter.res
@@ -7,7 +7,7 @@
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
 <batchResponse xmlns="urn:oasis:names:tc:DSML:2:0:core" requestID="[substrings] element has no subfilter [initial], [any], [final]">
-<errorResponse type="Unknown error">
+<errorResponse type="malformedRequest">
 <message>org.opends.server.types.LDAPException: Cannot decode the provided ASN.1 element as an LDAP search filter because the element was null</message>
 </errorResponse>
 </batchResponse>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/basic/snmp_basic_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/basic/snmp_basic_tests.xml
index f040b7e..8caeaf0 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/basic/snmp_basic_tests.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/basic/snmp_basic_tests.xml
@@ -1702,15 +1702,11 @@
               opendmkJarFile = '%s/%s/wrong_file' \
                                % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
               if is_windows_platform(DIRECTORY_INSTANCE_HOST):
-                opendmkJarFile = opendmkJarFile.replace('/', '\')
+                opendmkJarFile = opendmkJarFile.replace('/', '\\')
 
               msg1 = 'The specified OpenDMK jar file'
               msg2 = '\'%s\' could not be found.' % opendmkJarFile
-              msg3 = 'Verify that the value set in the opendmk-jarfile'
-              msg4 = 'configuration parameter of the SNMP connection handler'
-              msg5 = 'is the valid path to the jdmkrt.jar file and that the'
-              msg6 = 'file is accessible'
-              msg = '%s %s  %s %s %s %s' % (msg1, msg2, msg3, msg4, msg5, msg6)
+              msg = '%s %s' % (msg1, msg2)
             </script>
 
             <call function="'grep'">
@@ -1720,6 +1716,22 @@
               'testString': msg
               }
             </call>
+            
+            <script>
+              msg1 = 'Verify that the value set in the opendmk-jarfile'
+              msg2 = 'configuration parameter of the SNMP connection handler'
+              msg3 = 'is the valid path to the jdmkrt.jar file and that the'
+              msg4 = 'file is accessible'
+              msg = '%s %s %s %s' % (msg1, msg2, msg3, msg4)
+            </script>
+            
+            <call function="'grep'">
+              {
+              'location'  : STAF_REMOTE_HOSTNAME ,
+              'filename'  : serverLogFile ,
+              'testString': msg
+              }
+            </call>
 
             <call function="'testStep'">
               { 'stepMessage' : 'Get status when the server is started' }
diff --git a/opends/tests/staf-tests/shared/functions/utils.xml b/opends/tests/staf-tests/shared/functions/utils.xml
index 4fda224..59359ff 100755
--- a/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opends/tests/staf-tests/shared/functions/utils.xml
@@ -2326,7 +2326,13 @@
         else:
           # expect testString not to be present in filecontent
           myExpectedResult = '0'                 
-      </script>        
+      </script>  
+      
+      <if expr="VERBOSE_MODE == 'true'">
+        <message>
+          'File content %s' % filecontent
+        </message>
+      </if>
 
       <call function="'searchStringForSubstring'">
         {

--
Gitblit v1.10.0