#@TestResult Success if the 2 tests are PASS <
testcase name="getTestCaseName('Pwd Length Min: Preamble Setup')">
<
call function="'testCase_Preamble'"/>
'%s Preamble Step 1. Checking existence of %s' % (msg,msg1)
<
call function="'compareEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'attrToBeCompared' : 'ds-cfg-min-password-length:6',
'entryToBeCompared' : val }
<!--- Admin Enable Pwd Length Validator --> '%s Preamble Step 2. Admin Enabling Pwd Length Validator' % msg
<
call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'password-validator' ,
'attributeValue' : 'Length-Based %s' % msg2 }
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length : Pwd Too Short #@TestPurpose Pwd Length Setup #@TestStep Step 1. User Changing with short Password RC 19 #@TestStep Step 2. User Search With short Password RC 49 #@TestResult Success if the 2 tests are PASS <!--- Test Case : User Change Password - Too Short--> <
testcase name="getTestCaseName('Pwd Length Min: Pwd Too Short 1')">
<
call function="'testCase_Preamble'"/>
'%s Pwd Too Short 1 Step 1. User Changing Password' % msg
<
call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'oranges' ,
'dsAuthzID' : 'dn:uid=bhall, %s' % basedn,
'dsNewPassword' : 'grape' ,
<!--- User Search With Password --> '%s Pwd Too Short 1 Step 2. User Searching With Password' % msg
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn ,
'dsInstancePswd' : 'grape' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Admin Change Minimum Pwd Length #@TestPurpose Pwd Length Admin Change Minimum Pwd Length #@TestStep Admin Change Min Pwd Length to 4 #@TestResult Success if the test is PASS <!--- Test Case : Admin Change Minimum Pwd Length --> <
testcase name="getTestCaseName ('Pwd Length Min: Admin Change Min Pwd Length')">
<
call function="'testCase_Preamble'"/>
'%s Admin Changing Minimum Pwd Length' % msg
<
call function="'dsconfigSet'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'objectName' : 'password-validator' ,
'propertyType' : 'validator' ,
'propertyName' : 'Length-Based %s' % msg2 ,
'attributeName' : 'min-password-length' ,
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length User Password - Too Short 2 #@TestPurpose Pwd Length User Password - Too Short 2 #@TestStep User Change Password - Too Short 2 RC 19 #@TestStep User Searching With Password Too Short 2 RC 49 #@TestResult Success if the 2 tests are PASS <!--- Test Case : User Change Password - Too Short 2--> <
testcase name="getTestCaseName('Pwd Length Min: Pwd Too Short 2')">
<
call function="'testCase_Preamble'"/>
'%s Pwd Too Short 2 Step 1. User Changing Password' % msg
<
call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'oranges' ,
'DNToModify' : 'uid=bhall, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'goo' ,
'changetype' : 'replace' ,
<!--- User Search With Password --> '%s Pwd Too Short 2 Step 2. User Searching With Password' % msg
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'goo' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length User Password 4 characters #@TestPurpose Pwd Length User Password 4 characters #@TestStep User Change Password RC 0 #@TestStep User Searching With Password RC 0 #@TestResult Success if the 2 tests are PASS <!--- Test Case : User Change Password--> <
testcase name="getTestCaseName('Pwd Length Min: User Change Pwd')">
<
call function="'testCase_Preamble'"/>
'%s User Change Pwd Step 1. User Changing Password' % msg
<
call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'oranges' ,
'dsAuthzID' : 'dn:uid=bhall, %s' % basedn,
'dsNewPassword' : 'grape' }
<!--- User Search With Password --> '%s User Change Pwd Step 2. User Searching With Password' % msg
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'grape' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Admin Reset Minimum Pwd Length #@TestPurpose Pwd Length Admin Reset Minimum Pwd Length #@TestStep Admin Reset Minimum Pwd Length #@TestResult Success if the test is PASS <
testcase name="getTestCaseName('Pwd Length Min: Postamble Reset')">
<
call function="'testCase_Preamble'"/>
'%s Postamble - Admin Resetting Minimum Pwd Length' % msg
<
call function="'dsconfigSet'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'objectName' : 'password-validator' ,
'propertyType' : 'validator' ,
'propertyName' : 'Length-Based %s' % msg2 ,
'attributeName' : 'min-password-length' ,
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Max Preamble #@TestPurpose Pwd Length Max setup #@TestStep Checking existence of ds-cfg-max-password-length #@TestStep Admin Changing Maximum Pwd Length to 10 #@TestResult Success if the 2 tests are PASS <
testcase name="getTestCaseName('Pwd Length Max: Preamble Setup')">
<
call function="'testCase_Preamble'"/>
'%s Preamble Step 1. Checking existence of %s' % (msg3,msg4)
<
call function="'compareEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'attrToBeCompared' : 'ds-cfg-max-password-length:0',
'entryToBeCompared' : '%s' % val }
<!--- Admin Change Maximum Pwd Length --> '%s Preamble Step 2. Admin Changing Maximum Pwd Length' % msg3
<
call function="'dsconfigSet'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'objectName' : 'password-validator' ,
'propertyType' : 'validator' ,
'propertyName' : 'Length-Based %s' % msg2,
'attributeName' : 'max-password-length' ,
'attributeValue' : '10' }
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Max User Password - Too Long #@TestPurpose Pwd Length Max User Password - Too Long #@TestStep User Changing Password over 10 RC 19 #@TestStep User Searching Password over 10 RC 49 #@TestResult Success if the 2 tests are PASS <
testcase name="getTestCaseName('Pwd Length Max: Pwd Too Long 1')">
<
call function="'testCase_Preamble'"/>
'%s Pwd Too Long 1 Step 1. User Changing Password' % msg3
<
call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'grape' ,
'dsAuthzID' : 'dn:uid=bhall, %s' % basedn,
'dsNewPassword' : 'pomegranates' ,
<!--- User Search With Password --> '%s Pwd Too Long 1 Step 2. User Searching With Password' % msg3
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'pomegranates' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Max Pwd under 10 #@TestPurpose Pwd Length Max Pwd under 10 #@TestStep User Changing Password under 10 RC 0 #@TestStep User Searching Password under 10 RC 0 #@TestResult Success if the 2 tests are PASS <
testcase name="getTestCaseName('Pwd Length Max: User Change Pwd')">
<
call function="'testCase_Preamble'"/>
'%s User Change Password Step 1. User Changing Password' % msg3
<
call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'grape' ,
'dsAuthzID' : 'dn:uid=bhall, %s' % basedn,
'dsNewPassword' : 'grapefruit' }
<!--- User Search With Password --> '%s User Change Password Step 2. User Searching With Pwd' % msg3
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn,
'dsInstancePswd' : 'grapefruit' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestName Pwd Length Max Postamble #@TestPurpose Pwd Length Max Postamble #@TestStep Admin Resetting Maximum Pwd Length #@TestStep User Changing Password over 10 RC 0 #@TestStep User Searching Password over 10 RC 0 #@TestResult Success if the 3 tests are PASS <
testcase name="getTestCaseName('Pwd Length Max: Postamble Reset')">
<
call function="'testCase_Preamble'"/>
'%s Postamble Step 1. Admin Resetting Maximum Pwd Length' % msg3
<
call function="'dsconfigSet'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'objectName' : 'password-validator' ,
'propertyType' : 'validator' ,
'propertyName' : 'Length-Based %s' % msg2 ,
'attributeName' : 'max-password-length' ,
<!--- User Change Password --> '%s Postamble Step 2. User Changing Password' % msg3
<
call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn ,
'dsInstancePswd' : 'grapefruit' ,
'DNToModify' : 'uid=bhall,%s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'pomegranates' ,
'changetype' : 'replace' }
'%s User Change Password Step 2. User Searching With Pwd' % msg3
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=bhall,%s' % basedn ,
'dsInstancePswd' : 'pomegranates' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
<
call function="'testCase_Postamble'"/>