From ccb383c5308f88916e6946ef9479cedef8d98481 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Tue, 04 Aug 2009 10:14:21 +0000
Subject: [PATCH] refactoring to use different backend types
---
opends/tests/staf-tests/functional-tests/testcases/privileges/privileges.xml | 132 +++++++++++++++++++++++---------------------
1 files changed, 69 insertions(+), 63 deletions(-)
diff --git a/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges.xml b/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges.xml
index c6de689..95fa9ed 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/privileges/privileges.xml
@@ -23,78 +23,84 @@
!
! CDDL HEADER END
!
- ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
! -->
<stax>
-
- <defaultcall function="main_privileges"/>
-
+ <defaultcall function="main_privileges" />
<function name="main_privileges">
<function-list-args>
<function-required-arg name="STAXParentID"/>
</function-list-args>
+
<sequence>
-
- <block name="'privileges'">
-
- <sequence>
-
- <!--- Load the job environment for the test group execution -->
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
- <call function="'loadJobEnvironment'">
- { 'parent' : STAXParentID }
- </call>
+ <try>
+ <block name="'privileges'">
+ <sequence>
+ <!--- Load the job environment for the test group execution -->
+ <import machine="STAF_LOCAL_HOSTNAME"
+ file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
+ <call function="'loadJobEnvironment'">
+ { 'parent' : STAXParentID }
+ </call>
+ <script>
+ CurrentTestPath['group']='privileges'
+ _group=CurrentTestPath['group']
+
+ GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
+ </script>
+ <call function="'testGroup_Preamble'" />
+ <script>
+ suiteList = []
+ suiteList.append('users')
+ suiteList.append('directory_manager')
+ suiteList.append('new_root_user')
+ suiteList.append('unindexed_searches')
+ suiteList.append('import_task')
+ suiteList.append('export_task')
+ suiteList.append('backup_task')
+ suiteList.append('restore_task')
+ </script>
- <script>
- CurrentTestPath['group']='privileges'
- GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
- </script>
-
- <call function="'testGroup_Preamble'"/>
+ <!-- Run the test suites -->
+ <iterate var="_suite" in="suiteList">
+ <sequence>
+ <try>
+ <sequence>
+ <import machine="STAF_LOCAL_HOSTNAME"
+ file="'%s/testcases/%s/%s_%s.xml' % (TESTS_DIR,_group,_group,_suite)"/>
+ <call function="'%s_%s' % (_group,_suite)" />
+ </sequence>
+ <catch exception="'STAFException.TestSuite.SetupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Setup of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ <catch exception="'STAFException.TestSuite.MainException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Main part of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ <catch exception="'STAFException.TestSuite.CleanupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Cleanup of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ </try>
+ </sequence>
+ </iterate>
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_users.xml' % (TESTS_DIR)"/>
- <call function="'privileges_users'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_directory_manager.xml' % (TESTS_DIR)"/>
- <call function="'privileges_directory_manager'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_new_root_user.xml' % (TESTS_DIR)"/>
- <call function="'privileges_new_root_user'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_unindexed_searches.xml' % (TESTS_DIR)"/>
- <call function="'privileges_unindexed_searches'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_import_task.xml' % (TESTS_DIR)"/>
- <call function="'privileges_import_task'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_export_task.xml' % (TESTS_DIR)"/>
- <call function="'privileges_export_task'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_backup_task.xml' % (TESTS_DIR)"/>
- <call function="'privileges_backup_task'" />
-
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/privileges/privileges_restore_task.xml' % (TESTS_DIR)"/>
- <call function="'privileges_restore_task'" />
-
-
+ </sequence>
+ </block>
+ <catch exception="'STAXException.TestGroupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Execution of Test Group Failed'</message>
+ </sequence>
+ </catch>
+ <finally>
+ <!-- Test Group postamble -->
<call function="'testGroup_Postamble'"/>
-
- </sequence>
-
- </block>
-
+ </finally>
+ </try>
</sequence>
-
</function>
-
-</stax>
+</stax>
\ No newline at end of file
--
Gitblit v1.10.0