snmp_traps.xml revision 5767
5065N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5065N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5065N/A<!--
5065N/A ! CDDL HEADER START
5065N/A !
5065N/A ! The contents of this file are subject to the terms of the
5065N/A ! Common Development and Distribution License, Version 1.0 only
5065N/A ! (the "License"). You may not use this file except in compliance
5065N/A ! with the License.
5065N/A !
5065N/A ! You can obtain a copy of the license at
5065N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5065N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5065N/A ! See the License for the specific language governing permissions
5065N/A ! and limitations under the License.
5065N/A !
5065N/A ! When distributing Covered Code, include this CDDL HEADER in each
5065N/A ! file and include the License file at
5065N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
5065N/A ! add the following below this CDDL HEADER, with the fields enclosed
5065N/A ! by brackets "[]" replaced with your own identifying information:
5065N/A ! Portions Copyright [yyyy] [name of copyright owner]
5065N/A !
5065N/A ! CDDL HEADER END
5065N/A !
5065N/A ! Copyright 2012 ForgeRock AS.
5065N/A ! -->
5065N/A<stax>
5065N/A <defaultcall function="main_snmp_traps"/>
5065N/A <function name="main_snmp_traps" scope="local">
5065N/A <sequence>
5065N/A <block name="'main_snmp_traps'">
5065N/A <try>
5065N/A <sequence>
5065N/A <script>
5065N/A CurrentTestPath['group']='snmp'
5065N/A CurrentTestPath['suite']='traps'
5065N/A
5065N/A __group=CurrentTestPath['group']
5065N/A __groupdir='%s/testcases/%s' % (TESTS_DIR,__group)
5065N/A </script>
5065N/A
5065N/A <!--- Test Suite information
5065N/A #@TestSuiteName SNMP default properties test suite
5065N/A #@TestSuitePurpose Verify SNMP default properties
5065N/A #@TestSuiteID traps
5065N/A #@TestSuiteGroup snmp
5065N/A #@TestGroup snmp
5065N/A #@TestScript snmp.xml
5065N/A #@TestHTMLLink http://www.forgerock.org/
5065N/A -->
5065N/A <call function="'testSuite_Preamble'"/>
5065N/A
5065N/A <try>
5065N/A <sequence>
5065N/A
5065N/A <!-- List of Import of Test Functions -->
5065N/A <script>
5065N/A importList=[]
5065N/A importList.append('traps/snmp_traps_defaultconf_tests')
5065N/A importList.append('traps/snmp_traps_customconf_tests')
5065N/A </script>
5065N/A
5065N/A <!-- Import the files for this test suite -->
5065N/A <iterate var="__import" in="importList">
5065N/A <import machine="STAF_LOCAL_HOSTNAME"
5065N/A file="'%s/%s.xml' % (__groupdir,__import)"/>
5065N/A </iterate>
5065N/A
5065N/A <!-- Specific to traps SNMP tests -->
5065N/A <script>
5065N/A # Default
5065N/A trapsCommunity = '%s' % SNMP_PROPERTIES['traps-community']
5065N/A outputFile = '%s/timer.out' % DIRECTORY_INSTANCE_DIR
5065N/A timerDuration = '5m'
5065N/A
5065N/A # Custom
5065N/A defTrapsCommunityProp = '%s' % SNMP_PROPERTIES['traps-community']
5065N/A newTrapsCommunityProp = 'myCommunity'
5065N/A newTrapsDestProp = DIRECTORY_INSTANCE_HOST
5065N/A wrongTrapsDestProp = 'wrongtrapdestination'
5065N/A outputFile2 = '%s/timer.out' % DIRECTORY_INSTANCE_DIR
5065N/A timerDuration2 = '5m'
5065N/A serverLogFile = '%s/%s/logs/server.out' \
5065N/A % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
5065N/A </script>
5065N/A
5065N/A <!-- List of Test Cases -->
5065N/A <script>
5065N/A testsList=[]
5065N/A testsList.append('snmp_traps_default_001')
testsList.append('snmp_traps_default_002')
testsList.append('snmp_traps_default_003')
testsList.append('snmp_traps_custom_001')
testsList.append('snmp_traps_custom_002')
testsList.append('snmp_traps_custom_003')
testsList.append('snmp_traps_custom_004')
testsList.append('snmp_traps_custom_005')
</script>
<!-- Execute the Tests -->
<iterate var="__test" in="testsList">
<sequence>
<call function="'%s' % (__test)" />
</sequence>
</iterate>
</sequence>
<catch exception="'STAFException.TestSuite.SetupException'">
<sequence>
<message log="1" level="'fatal'">
'Setup of test suite failed.'
</message>
<rethrow/>
</sequence>
</catch>
<finally>
<message>'Test Cases Completed.'</message>
</finally>
</try>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Global Schema Cleanup.'</message>
<try>
<message>'No Test Suite Cleanup'</message>
<catch exception="'STAFException'">
<sequence>
<message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
</sequence>
</catch>
<finally>
<call function="'testSuite_Postamble'"/>
</finally>
</try>
</sequence>
</finally>
</try>
</block>
</sequence>
</function>
</stax>