5785N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5785N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5785N/A<!--
5785N/A ! CDDL HEADER START
5785N/A !
5785N/A ! The contents of this file are subject to the terms of the
5785N/A ! Common Development and Distribution License, Version 1.0 only
5785N/A ! (the "License"). You may not use this file except in compliance
5785N/A ! with the License.
6982N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
5785N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5785N/A ! See the License for the specific language governing permissions
5785N/A ! and limitations under the License.
6982N/A !
5785N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
5785N/A ! Portions Copyright [yyyy] [name of copyright owner]
5785N/A !
5785N/A ! CDDL HEADER END
5785N/A !
5785N/A ! Copyright 2012 ForgeRock AS.
5785N/A ! -->
5785N/A<stax>
5785N/A <defaultcall function="main_pwp_grace_login"/>
5785N/A <function name="main_pwp_grace_login" scope="local">
5785N/A <sequence>
5785N/A <block name="'main_pwp_grace_login'">
5785N/A <try>
5785N/A <sequence>
5785N/A <script>
5785N/A CurrentTestPath['group'] = 'password_policy'
5785N/A CurrentTestPath['suite'] = 'grace_login'
5785N/A
5785N/A _group=CurrentTestPath['group']
5785N/A _groupdir='%s/testcases/%s' % (TESTS_DIR,_group)
5785N/A _label = 'PWP Grace Login'
5785N/A </script>
5785N/A
5785N/A <!--- Test Suite information
5785N/A #@TestSuiteName Password policy grace_login test suite
5785N/A #@TestSuitePurpose Verify password policy grace_login operations
5785N/A #@TestSuiteID grace_login
5785N/A #@TestSuiteGroup password_policy
5785N/A #@TestGroup password_policy
5785N/A #@TestScript password_policy.xml
5785N/A #@TestHTMLLink http://www.forgerock.org/
5785N/A -->
5785N/A <call function="'testSuite_Preamble'"/>
5785N/A
5785N/A <try>
5785N/A <sequence>
5785N/A
5785N/A <call function="'common_setup'">
5785N/A {
5785N/A 'quickStart' : False ,
5785N/A 'startServer' : True ,
5785N/A 'loadData' : True ,
5785N/A 'ldifFile' : '%s/password_policy/pwp_startup.ldif' % remote.data ,
5785N/A 'stopServer' : False ,
5785N/A 'friendlyName' : _label
5785N/A }
5785N/A </call>
5785N/A
5785N/A <!-- List of Import of Test Functions -->
5785N/A <script>
5785N/A importList=[]
5785N/A importList.append('grace_login/pwp_grace_login_tests')
5785N/A </script>
5785N/A
5785N/A <!-- Import the files for this test suite -->
5785N/A <iterate var="_import" in="importList">
5785N/A <import machine="STAF_LOCAL_HOSTNAME"
5785N/A file="'%s/%s.xml' % (_groupdir,_import)"/>
5785N/A </iterate>
5785N/A
5785N/A <!-- Specific to grace_login password policy tests -->
5785N/A <script>
5785N/A basedn1 = 'ou=people,ou=password tests,'
5785N/A basedn = '%s o=Pwd Policy Tests,dc=example,dc=com' % basedn1
5785N/A basepwp ='cn=Default Password Policy,cn=Password Policies,cn=config'
5785N/A msg = 'Security: Grace Login:'
5785N/A msg1 = 'Password Policy DN: %s' % basepwp
5785N/A msg2 = 'Account Is Disabled: false'
5785N/A msg3 = 'Password History:'
5785N/A
5785N/A grace_login_count = 3
5785N/A </script>
5785N/A
5785N/A <!-- List of Test Cases -->
5785N/A <script>
5785N/A testsList=[]
5785N/A testsList.append('pwp_grace_login_001')
5785N/A testsList.append('pwp_grace_login_002')
5785N/A testsList.append('pwp_grace_login_003')
5785N/A testsList.append('pwp_grace_login_004')
5785N/A testsList.append('pwp_grace_login_005')
5785N/A testsList.append('pwp_grace_login_006')
5785N/A testsList.append('pwp_grace_login_007')
5785N/A </script>
5785N/A
5785N/A <!-- Execute the Tests -->
5785N/A <iterate var="__test" in="testsList">
5785N/A <sequence>
5785N/A <call function="'%s' % (__test)" />
5785N/A </sequence>
5785N/A </iterate>
5785N/A
5785N/A </sequence>
5785N/A <catch exception="'STAFException.TestSuite.SetupException'">
5785N/A <sequence>
5785N/A <message log="1" level="'fatal'">
5785N/A 'Setup of test suite failed.'
5785N/A </message>
5785N/A <rethrow/>
5785N/A </sequence>
5785N/A </catch>
5785N/A
5785N/A <finally>
5785N/A <message>'Test Cases Completed.'</message>
5785N/A </finally>
5785N/A
5785N/A </try>
5785N/A
5785N/A </sequence>
5785N/A
5785N/A <finally>
5785N/A <sequence>
5785N/A <!-- Test Suite Cleanup -->
5785N/A <message>'Finally: Password Policy Cleanup.'</message>
5785N/A <try>
5785N/A <call function="'common_cleanup'">
5785N/A { 'friendlyName' :_label }
5785N/A </call>
5785N/A <catch exception="'STAFException'">
5785N/A <sequence>
5785N/A <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
5785N/A </sequence>
5785N/A </catch>
5785N/A <finally>
5785N/A <call function="'testSuite_Postamble'"/>
5785N/A </finally>
5785N/A </try>
5785N/A </sequence>
5785N/A </finally>
5785N/A
5785N/A </try>
5785N/A </block>
5785N/A </sequence>
5785N/A </function>
5785N/A</stax>