<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
! or http://forgerock.org/license/CDDLv1.0.html.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at legal-notices/CDDLv1_0.txt.
! If applicable, add the following below this CDDL HEADER, with the
! fields enclosed by brackets "[]" replaced with your own identifying
! information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2009 Sun Microsystems, Inc.
! Portions Copyright 2012 ForgeRock AS
! -->
<stax>
<defaultcall function="dsconfig_get"/>
<function name="dsconfig_get" scope="local">
<sequence>
<block name="'dsconfig_get'">
<try>
<sequence>
<script>
CurrentTestPath['group']='dsconfig'
CurrentTestPath['suite']='get'
__group=CurrentTestPath['group']
__groupdir='%s/testcases/%s' % (TESTS_DIR,__group)
__label = 'Dsconfig Get'
</script>
<!--- Test Suite information
#@TestSuiteName Dsconfig Batch Mode Tests
#@TestSuitePurpose Verify that the basic dsconfig get functionality is working in the Directory Server.
#@TestSuiteID Get Tests
#@TestSuiteGroup Get
#@TestGroup Dsconfig
#@TestScript dsconfig_get.xml
#@TestHTMLLink http://opends.dev.java.net/
-->
<call function="'testSuite_Preamble'"/>
<try>
<sequence>
<call function="'common_setup'">
{
'quickStart' : False,
'startServer' : True,
'stopServer' : False,
'friendlyName' : __label
}
</call>
<script>
i=1
def test_list(datafile):
thisList = []
f = open(datafile,'r')
for line in f.readlines():
if line.startswith('#'):
continue
else:
lineSingle = line.split(':')
thisList.append(lineSingle)
f.close()
return thisList
testList1=test_list('%s/testcases/dsconfig/dsconfig_get/get.dat' % (TESTS_DIR))
testList2=test_list('%s/testcases/dsconfig/dsconfig_get/get2.dat' % (TESTS_DIR))
componentNumber=0
testNumber=0
</script>
<!-- List of Import of Test Functions -->
<script>
dsconfig_getList=[]
dsconfig_getList.append('dsconfig_get/dsconfig_get_tests')
</script>
<!-- Import the files for this test suite -->
<iterate var="__list" in="dsconfig_getList">
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/%s.xml' % (__groupdir,__list)"/>
</iterate>
<!-- List of Test Cases -->
<script>
testsList=[]
testsList.append(['dsconfig_get_001','testList1'])
testsList.append(['dsconfig_get_002','testList2'])
</script>
<!-- Execute the Tests -->
<iterate var="__test" in="testsList">
<sequence>
<call function="'%s' % (__test[0])" >
{ 'componentList': eval(__test[1])}
</call>
</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 Cleanup.'</message>
<try>
<call function="'common_cleanup'">
{ 'friendlyName' : __label }
</call>
<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>