Commit 302424e7 authored by Iustin Pop's avatar Iustin Pop
Browse files

Make x509 unittest testClockSkew a bit less flaky

Since the tested function actually uses time.time(), it cannot be make
fully stable, but 1 second is very dangerous; let's just test SKEW * 2
and higher since that should be good (if the delta between _GenCert
and VerifyX509Certificate is 5 minutes, then…).
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarRené Nussbaumer <>
parent 216d23c0
......@@ -195,7 +195,7 @@ class TestCertVerification(testutils.GanetiTestCase):
self.assertEqual(result, (None, None))
# skew too great, not accepting certs
for before in [SKEW + 1, SKEW * 2, SKEW * 10]:
for before in [SKEW * 2, SKEW * 10]:
cert = self._GenCert(key, before, validity)
(status, msg) = utils.VerifyX509Certificate(cert, 1, 2)
self.assertEqual(status, utils.CERT_WARNING)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment