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