1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

selftest: Avoid a build started around midnight failing (again)

This case most likely relates to Daylight Saving changes creating
a 23 hour day.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett
2018-02-14 11:29:54 +13:00
parent 23ec302122
commit 278ac39384

View File

@ -36,9 +36,10 @@ class PasswordExpirePamTests(samba.tests.TestCase):
if warn_pwd_expire == 0:
self.assertTrue(res.info == ())
elif warn_pwd_expire == 50:
# This is needed as otherwise a build started just before
# This is needed as otherwise a build started around
# midnight can fail
if (res.info[0] != u"Your password will expire in 41 days.\n"):
if (res.info[0] != u"Your password will expire in 41 days.\n") and \
(res.info[0] != u"Your password will expire in 43 days.\n"):
self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n")
else:
self.assertEqual(warn_pwd_expire, 0)