From 364effcd91c1540689f2e1675fa1676e91e0d5f0 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Wed, 02 Jul 2008 08:45:28 +0000
Subject: [PATCH] Add known issue tage for issue 3435 and remove tag for issue 3301, 3304

---
 opends/tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml  |  123 +++++++++++++++++++++++++++++++++++++----
 opends/tests/shared/functions/snmp.xml                                 |    4 -
 opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml |   18 +++++-
 opends/tests/functional-tests/testcases/snmp/snmp_v3_customconf.xml    |   12 ---
 4 files changed, 129 insertions(+), 28 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml b/opends/tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
index afad415..9460e5d 100644
--- a/opends/tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
+++ b/opends/tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
@@ -64,7 +64,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with custom configuration
             #@TestName            trap_customconf: TODO
-            #@TestIssue           none
+            #@TestIssue           3435
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -291,6 +291,12 @@
                 'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD
                 }
               </call>
+              
+              <if expr="is_windows_platform(DIRECTORY_INSTANCE_HOST)">
+                <script>
+                  knownIssue(3435)
+                </script>
+              </if>
 
               <call function="'testCase_Postamble'"/>
 
@@ -301,7 +307,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with custom configuration
             #@TestName            trap_customconf: TODO
-            #@TestIssue           none
+            #@TestIssue           3435
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -453,6 +459,12 @@
                 }
               </call>
 
+              <if expr="is_windows_platform(DIRECTORY_INSTANCE_HOST)">
+                <script>
+                  knownIssue(3435)
+                </script>
+              </if>
+
               <call function="'testCase_Postamble'"/>
 
             </sequence>
@@ -462,7 +474,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with custom configuration
             #@TestName            trap_customconf: TODO
-            #@TestIssue           3304
+            #@TestIssue           none
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -554,10 +566,55 @@
                       <call function="'StopDsWithScript'">
                         {
                         'location'  : STAF_REMOTE_HOSTNAME ,
-                        'dsRestart' : 'True'
+                        'dsHost'    : DIRECTORY_INSTANCE_HOST ,
+                        'dsPort'    : DIRECTORY_INSTANCE_PORT ,
+                        'dsBindDN'  : DIRECTORY_INSTANCE_DN ,
+                        'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
                         }
                       </call>
-
+                      
+                      <call function="'StartDsWithScript'">
+                        { 'location' : STAF_REMOTE_HOSTNAME }
+                      </call>
+                      <script>
+                        returnString = STAXResult[0][1]
+                      </script>
+                      
+                      <!--- Check that DS started -->
+                      <call function="'isAlive'">
+                        {
+                        'noOfLoops'        : 5 ,
+                        'noOfMilliSeconds' : 2000
+                        }
+                      </call>
+                      
+                      <script>
+                        msg1 = 'Traps Destination %s is an unknown host.' \
+                               % wrongTrapsDestProp
+                        msg2 = 'Traps will not be sent to this destination'
+                        msg = '%s %s' % (msg1, msg2)
+                      </script>
+                      
+                      <call function="'checktestString'">
+                        {
+                        'returnString'   : returnString ,
+                        'expectedString' : msg
+                        }
+                      </call>
+                      
+                      <script>
+                        msg1 = 'No valid trap destinations has been found.'
+                        msg2 = 'No trap will be sent'
+                        msg = '%s %s' % (msg1, msg2)
+                      </script>
+                      
+                      <call function="'checktestString'">
+                        {
+                        'returnString'   : returnString ,
+                        'expectedString' : msg
+                        }
+                      </call>
+                      
                       <message>
                         'trap_customconf: send event to the trap listener'
                       </message>
@@ -614,10 +671,6 @@
                 }
               </call>
 
-              <script>
-                knownIssue(3304)
-              </script>
-
               <call function="'testCase_Postamble'"/>
 
             </sequence>
@@ -627,7 +680,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with custom configuration
             #@TestName            trap_customconf: TODO
-            #@TestIssue           none
+            #@TestIssue           3435
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -732,7 +785,39 @@
                       <call function="'StopDsWithScript'">
                         {
                         'location'  : STAF_REMOTE_HOSTNAME ,
-                        'dsRestart' : 'True'
+                        'dsHost'    : DIRECTORY_INSTANCE_HOST ,
+                        'dsPort'    : DIRECTORY_INSTANCE_PORT ,
+                        'dsBindDN'  : DIRECTORY_INSTANCE_DN ,
+                        'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
+                        }
+                      </call>
+                      <call function="'StartDsWithScript'">
+                        { 'location' : STAF_REMOTE_HOSTNAME }
+                      </call>
+                      
+                      <script>
+                        returnString = STAXResult[0][1]
+                      </script>
+                      
+                      <!--- Check that DS started -->
+                      <call function="'isAlive'">
+                        {
+                        'noOfLoops'        : 5 ,
+                        'noOfMilliSeconds' : 2000
+                        }
+                      </call>
+                      
+                      <script>
+                        msg1 = 'Traps Destination %s is an unknown host.' \
+                               % wrongTrapsDestProp
+                        msg2 = 'Traps will not be sent to this destination'
+                        msg = '%s %s' % (msg1, msg2)
+                      </script>
+                      
+                      <call function="'checktestString'">
+                        {
+                        'returnString'   : returnString ,
+                        'expectedString' : msg
                         }
                       </call>
 
@@ -792,6 +877,12 @@
                 }
               </call>
 
+              <if expr="is_windows_platform(DIRECTORY_INSTANCE_HOST)">
+                <script>
+                  knownIssue(3435)
+                </script>
+              </if>
+
               <call function="'testCase_Postamble'"/>
 
             </sequence>
@@ -836,8 +927,16 @@
 
               <script>
                 returnString = STAXResult[0][1]
+
+                if is_windows_platform(DIRECTORY_INSTANCE_HOST):
+                  newline = '\r\n'
+                else:
+                  newline = '\n'
+
+                returnString = STAXResult[0][1]
                 msg1 = 'It is not possible to specify multiple values for the'
-                msg2 = 'SNMP Connection Handler\nproperty "traps-community"'
+                msg2 = 'SNMP Connection Handler%sproperty "traps-community"' \
+                       % newline               
                 msg3 = 'as it is single-valued'
                 msg = '%s %s %s' % (msg1, msg2, msg3)
               </script>
diff --git a/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml b/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
index f2cab3c..e0d5cb1 100644
--- a/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
+++ b/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
@@ -61,7 +61,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with default configuration
             #@TestName            trap_defaultconf: trap on stop-ds
-            #@TestIssue           none
+            #@TestIssue           3435
             #@TestPurpose         Check that a trap is sent on default trap
                                   community after stop-ds command.
             #@TestPreamble        none
@@ -152,6 +152,12 @@
                 'timerRC'       : timerRC
                 }
               </call>
+              
+              <if expr="is_windows_platform(STAF_REMOTE_HOSTNAME)">
+                <script>
+                  knownIssue(3435)
+                </script>
+              </if>
 
               <call function="'testCase_Postamble'"/>
 
@@ -263,7 +269,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP trap with default configuration
             #@TestName            trap_defaultconf: trap on stop-ds -R
-            #@TestIssue           none
+            #@TestIssue           3435
             #@TestPurpose         Check that 2 traps are sent on default trap
                                   community after stop-ds -R command.
             #@TestPreamble        none
@@ -357,7 +363,13 @@
                 'timerRC'       : timerRC
                 }
               </call>
-
+              
+              <if expr="is_windows_platform(STAF_REMOTE_HOSTNAME)">
+                <script>
+                  knownIssue(3435)
+                </script>
+              </if>
+              
               <call function="'testCase_Postamble'"/>
 
             </sequence>
diff --git a/opends/tests/functional-tests/testcases/snmp/snmp_v3_customconf.xml b/opends/tests/functional-tests/testcases/snmp/snmp_v3_customconf.xml
index 0ec8ceb..7921fce 100644
--- a/opends/tests/functional-tests/testcases/snmp/snmp_v3_customconf.xml
+++ b/opends/tests/functional-tests/testcases/snmp/snmp_v3_customconf.xml
@@ -127,7 +127,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP v3 with custom configuration
             #@TestName            v3_customconf: TODO
-            #@TestIssue           3301
+            #@TestIssue           none
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -195,10 +195,6 @@
                 }
               </call>
 
-              <script>
-                knownIssue(3301)
-              </script>
-
               <call function="'testCase_Postamble'"/>
 
             </sequence>
@@ -716,7 +712,7 @@
           <!--- Test Case information
             #@TestMarker          SNMP v3 with custom configuration
             #@TestName            v3_customconf: TODO
-            #@TestIssue           3301
+            #@TestIssue           none
             #@TestPurpose         TODO.
             #@TestPreamble        none
             #@TestStep            TODO.
@@ -846,10 +842,6 @@
                 }
               </call>
 
-              <script>
-                knownIssue(3301)
-              </script>
-
               <call function="'testCase_Postamble'"/>
 
             </sequence>
diff --git a/opends/tests/shared/functions/snmp.xml b/opends/tests/shared/functions/snmp.xml
index a6564fa..41b0e5a 100755
--- a/opends/tests/shared/functions/snmp.xml
+++ b/opends/tests/shared/functions/snmp.xml
@@ -477,9 +477,7 @@
       <message>
         '%s %s' % (STAFCmd, STAFCmdParams)
       </message>
-              <message>
-                'TOFTOF: %s' % outputFile
-              </message>
+
       <call function="'runCommand'" >
         {
         'name'       : 'SNMP Trap Listener' ,

--
Gitblit v1.10.0