5787N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5787N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5787N/A<!--
5787N/A ! CDDL HEADER START
5787N/A !
5787N/A ! The contents of this file are subject to the terms of the
5787N/A ! Common Development and Distribution License, Version 1.0 only
5787N/A ! (the "License"). You may not use this file except in compliance
5787N/A ! with the License.
5787N/A !
5787N/A ! You can obtain a copy of the license at
5787N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5787N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5787N/A ! See the License for the specific language governing permissions
5787N/A ! and limitations under the License.
5787N/A !
5787N/A ! When distributing Covered Code, include this CDDL HEADER in each
5787N/A ! file and include the License file at
5787N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
5787N/A ! add the following below this CDDL HEADER, with the fields enclosed
5787N/A ! by brackets "[]" replaced with your own identifying information:
5787N/A ! Portions Copyright [yyyy] [name of copyright owner]
5787N/A !
5787N/A ! CDDL HEADER END
5787N/A !
5787N/A ! Copyright 2012 ForgeRock AS.
5787N/A ! -->
5787N/A<stax>
5787N/A <defaultcall function="main_pwp_last_login"/>
5787N/A <function name="main_pwp_last_login" scope="local">
5787N/A <sequence>
5787N/A <block name="'main_pwp_last_login'">
5787N/A <try>
5787N/A <sequence>
5787N/A <script>
5787N/A CurrentTestPath['group'] = 'password_policy'
5787N/A CurrentTestPath['suite'] = 'last_login'
5787N/A
5787N/A _group=CurrentTestPath['group']
5787N/A _groupdir='%s/testcases/%s' % (TESTS_DIR,_group)
5787N/A _label = 'PWP Last Login'
5787N/A </script>
5787N/A
5787N/A <!--- Test Suite information
5787N/A #@TestSuiteName Password policy last_login test suite
5787N/A #@TestSuitePurpose Verify password policy last_login operations
5787N/A #@TestSuiteID last_login
5787N/A #@TestSuiteGroup password_policy
5787N/A #@TestGroup password_policy
5787N/A #@TestScript password_policy.xml
5787N/A #@TestHTMLLink http://www.forgerock.org/
5787N/A -->
5787N/A <call function="'testSuite_Preamble'"/>
5787N/A
5787N/A <try>
5787N/A <sequence>
5787N/A
5787N/A <call function="'common_setup'">
5787N/A {
5787N/A 'quickStart' : False ,
5787N/A 'startServer' : True ,
5787N/A 'loadData' : True ,
5787N/A 'ldifFile' : '%s/password_policy/pwp_startup.ldif' % remote.data ,
5787N/A 'stopServer' : False ,
5787N/A 'friendlyName' : _label
5787N/A }
5787N/A </call>
5787N/A
5787N/A <!-- List of Import of Test Functions -->
5787N/A <script>
5787N/A importList=[]
5787N/A importList.append('last_login/pwp_last_login_tests')
5787N/A </script>
5787N/A
5787N/A <!-- Import the files for this test suite -->
5787N/A <iterate var="_import" in="importList">
5787N/A <import machine="STAF_LOCAL_HOSTNAME"
5787N/A file="'%s/%s.xml' % (_groupdir,_import)"/>
5787N/A </iterate>
5787N/A
5787N/A <!-- Specific to last_login password policy tests -->
5787N/A <script>
5787N/A basedn = 'ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com'
5787N/A basepwp = 'cn=Default Password Policy,cn=Password Policies,cn=config'
5787N/A msg1 = 'Password Policy: Last Login:'
5787N/A
5787N/A #Configurable Idle Lockout Interval Times
5787N/A shortIntervalTime = '25s'
5787N/A longIntervalTime = '25s'
5787N/A shortSleepTime = 15000
5787N/A longSleepTime = 30000
5787N/A </script>
5787N/A
5787N/A <!-- List of Test Cases -->
5787N/A <script>
5787N/A testsList=[]
5787N/A testsList.append('pwp_last_login_001')
5787N/A testsList.append('pwp_last_login_002')
5787N/A testsList.append('pwp_last_login_003')
5787N/A testsList.append('pwp_last_login_004')
5787N/A testsList.append('pwp_last_login_005')
5787N/A testsList.append('pwp_last_login_006')
5787N/A testsList.append('pwp_last_login_007')
5787N/A testsList.append('pwp_last_login_008')
5787N/A testsList.append('pwp_last_login_009')
5787N/A testsList.append('pwp_last_login_010')
5787N/A testsList.append('pwp_last_login_011')
5787N/A testsList.append('pwp_last_login_012')
5787N/A testsList.append('pwp_last_login_013')
5787N/A testsList.append('pwp_last_login_014')
5787N/A testsList.append('pwp_last_login_015')
5787N/A testsList.append('pwp_last_login_016')
5787N/A testsList.append('pwp_last_login_017')
5787N/A testsList.append('pwp_last_login_018')
5787N/A testsList.append('pwp_last_login_019')
5787N/A testsList.append('pwp_last_login_020')
5787N/A </script>
5787N/A
5787N/A <!-- Execute the Tests -->
5787N/A <iterate var="__test" in="testsList">
5787N/A <sequence>
5787N/A <call function="'%s' % (__test)" />
5787N/A </sequence>
5787N/A </iterate>
5787N/A
5787N/A </sequence>
5787N/A <catch exception="'STAFException.TestSuite.SetupException'">
5787N/A <sequence>
5787N/A <message log="1" level="'fatal'">
5787N/A 'Setup of test suite failed.'
5787N/A </message>
5787N/A <rethrow/>
5787N/A </sequence>
5787N/A </catch>
5787N/A
5787N/A <finally>
5787N/A <message>'Test Cases Completed.'</message>
5787N/A </finally>
5787N/A
5787N/A </try>
5787N/A
5787N/A </sequence>
5787N/A
5787N/A <finally>
5787N/A <sequence>
5787N/A <!-- Test Suite Cleanup -->
5787N/A <message>'Finally: Password Policy Cleanup.'</message>
5787N/A <try>
5787N/A <call function="'common_cleanup'">
5787N/A { 'friendlyName' :_label }
5787N/A </call>
5787N/A <catch exception="'STAFException'">
5787N/A <sequence>
5787N/A <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
5787N/A </sequence>
5787N/A </catch>
5787N/A <finally>
5787N/A <call function="'testSuite_Postamble'"/>
5787N/A </finally>
5787N/A </try>
5787N/A </sequence>
5787N/A </finally>
5787N/A
5787N/A </try>
5787N/A </block>
5787N/A </sequence>
5787N/A </function>
5787N/A</stax>