mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Christophe Sovant
31.32.2008 b82a60a3f61646bcd452aa9b0a8f8b2617238b7a
Add new testcases in snmp_setup testsuite
2 files modified
148 ■■■■■ changed files
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_setup.xml 140 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_setup.xml
@@ -183,6 +183,99 @@
              <!--- Test Case information
                #@TestMarker          setup
                #@TestName            setup: get default SNMP connection handler
                                      properties
                #@TestIssue           none
                #@TestPurpose         Get default SNMP connection handler
                                      properties.
                #@TestPreamble        none
                #@TestStep            get default SNMP connection handler
                                      properties using dsconfig.
                #@TestPostamble       none
                #@TestResult          Success if GetDSConfigProperties returns 0
              -->
              <testcase name="getTestCaseName
              ('setup: get default SNMP Connection Handler properties')">
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <message>
                    'setup: get default SNMP Connection Handler properties'
                  </message>
                  <script>
                    options = '--handler-name "SNMP Connection Handler"'
                  </script>
                  <call function="'GetDSConfigProperties'">
                    {
                    'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'      : 'get-connection-handler-prop' ,
                    'optionsString'   : options ,
                    'myVariableName'  : 'DEFAULT_PROPERTIES'
                    }
                  </call>
                  <call function="'testCase_Postamble'"/>
                </sequence>
              </testcase>
              <!--- Test Case information
                #@TestMarker          setup
                #@TestName            setup: check SNMP Connection Handler is
                                      disabled
                #@TestIssue           none
                #@TestPurpose         Check SNMP Connection Handler is disabled.
                #@TestPreamble        none
                #@TestStep            check SNMP Connection Handler is
                                      disabled using status command
                #@TestPostamble       none
                #@TestResult          Success if output of status is correct.
              -->
              <testcase name="getTestCaseName
              ('setup: check SNMP Connection Handler is disabled')">
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <message>
                    'setup: check SNMP Connection Handler is disabled'
                  </message>
                  <call function="'StatusWithScript'">
                    {
                    'dsBindDN'  : DIRECTORY_INSTANCE_DN ,
                    'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
                    }
                  </call>
                  <script>
                    returnString = STAXResult[0][1]
                  </script>
                  <call function="'checktestString'">
                    {
                    'returnString'   : returnString ,
                    'expectedString' : ': SNMP     : Disabled'
                    }
                  </call>
                  <call function="'testCase_Postamble'"/>
                </sequence>
              </testcase>
              <!--- Test Case information
                #@TestMarker          setup
                #@TestName            setup: enable SNMP Connection Handler
                #@TestIssue           none
                #@TestPurpose         Enable SNMP Connection Handler.
@@ -228,6 +321,53 @@
              
              <!--- Test Case information
                #@TestMarker          setup
                #@TestName            setup: check SNMP Connection Handler is
                                      enabled
                #@TestIssue           none
                #@TestPurpose         Check SNMP Connection Handler is enabled.
                #@TestPreamble        none
                #@TestStep            check SNMP Connection Handler is
                                      enabled using status command
                #@TestPostamble       none
                #@TestResult          Success if output of status is correct.
              -->
              <testcase name="getTestCaseName
              ('setup: check SNMP Connection Handler is enabled')">
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <message>
                    'setup: check SNMP Connection Handler is enabled'
                  </message>
                  <call function="'StatusWithScript'">
                    {
                    'dsBindDN'  : DIRECTORY_INSTANCE_DN ,
                    'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
                    }
                  </call>
                  <script>
                    returnString = STAXResult[0][1]
                  </script>
                  <call function="'checktestString'">
                    {
                    'returnString'   : returnString ,
                    'expectedString' : ': SNMP     : Enabled'
                    }
                  </call>
                  <call function="'testCase_Postamble'"/>
                </sequence>
              </testcase>
              <!--- Test Case information
                #@TestMarker          setup
                #@TestName            setup: get SNMP connection handler 
                                      properties
                #@TestIssue           none
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
@@ -53,7 +53,7 @@
          
          <!--- Define default value for community -->          
          <script>
            community = '%s' % SNMP_PROPERTIES['community']
            trapsCommunity = '%s' % SNMP_PROPERTIES['traps-community']
            timerDuration = '5m'
          </script>
          
@@ -91,7 +91,7 @@
                        'location'          : STAF_REMOTE_HOSTNAME ,
                        'snmpHost'          : DIRECTORY_INSTANCE_HOST ,
                        'snmpTrapPort'      : SNMP_TRAP_PORT ,
                        'snmpTrapCommunity' : community ,
                        'snmpTrapCommunity' : trapsCommunity ,
                        'snmpTrapNumber'    : '1,0,0,0,0,0'
                        }
                      </call>
@@ -210,7 +210,7 @@
                        {
                        'snmpHost'          : DIRECTORY_INSTANCE_HOST ,
                        'snmpTrapPort'      : SNMP_TRAP_PORT ,
                        'snmpTrapCommunity' : community ,
                        'snmpTrapCommunity' : trapsCommunity ,
                        'snmpTrapNumber'    : '1,0,0,0,0,0'
                        }
                      </call>
@@ -329,7 +329,7 @@
                        {
                        'snmpHost'          : DIRECTORY_INSTANCE_HOST ,
                        'snmpTrapPort'      : SNMP_TRAP_PORT ,
                        'snmpTrapCommunity' : community ,
                        'snmpTrapCommunity' : trapsCommunity ,
                        'snmpTrapNumber'    : '2,0,0,0,0,0'
                        }
                      </call>