mirror of
https://github.com/samba-team/samba.git
synced 2025-07-27 07:42:04 +03:00
selftest: Avoid a build started just before midnight failing
By allowing 41 or 42 days, we still test the expiry but are less sensitive to the current time. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
@ -36,6 +36,9 @@ class PasswordExpirePamTests(samba.tests.TestCase):
|
|||||||
if warn_pwd_expire == 0:
|
if warn_pwd_expire == 0:
|
||||||
self.assertTrue(res.info == ())
|
self.assertTrue(res.info == ())
|
||||||
elif warn_pwd_expire == 50:
|
elif warn_pwd_expire == 50:
|
||||||
|
# This is needed as otherwise a build started just before
|
||||||
|
# midnight can fail
|
||||||
|
if (res.info[0] != u"Your password will expire in 41 days"):
|
||||||
self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n")
|
self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n")
|
||||||
else:
|
else:
|
||||||
self.assertEqual(warn_pwd_expire, 0)
|
self.assertEqual(warn_pwd_expire, 0)
|
||||||
|
Reference in New Issue
Block a user