mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
tests: Increase minPwdAge used for PSO tests
The PSO minPwdAge test was using a 1 second timeout. While this seemed to work fine most of the time, we did see a rackspace failure that was presumably due to the test taking longer than 1-second to execute (which resulted in the password not being correctly rejected). This patch increases the minPwdAge used, to try to avoid this problem happening. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
e078991ae7
commit
016fc48a30
@ -451,7 +451,7 @@ class PasswordSettingsTestCase(PasswordTestCase):
|
||||
def test_pso_min_age(self):
|
||||
"""Tests that a PSO's min-age is enforced"""
|
||||
pso = PasswordSettings("min-age-PSO", self.ldb, password_len=10,
|
||||
password_age_min=1, complexity=False)
|
||||
password_age_min=2, complexity=False)
|
||||
self.add_obj_cleanup([pso.dn])
|
||||
|
||||
# create a user and apply the PSO
|
||||
@ -462,8 +462,8 @@ class PasswordSettingsTestCase(PasswordTestCase):
|
||||
# changing the password immediately should fail, even if password is valid
|
||||
valid_password = "min-age-passwd"
|
||||
self.assert_password_invalid(user, valid_password)
|
||||
# then trying the same password later (min-age=1sec) should succeed
|
||||
time.sleep(1.5)
|
||||
# then trying the same password later should succeed
|
||||
time.sleep(pso.password_age_min + 0.5)
|
||||
self.assert_password_valid(user, valid_password)
|
||||
|
||||
def test_pso_max_age(self):
|
||||
|
Reference in New Issue
Block a user