From 7a7b93511b9efda11deec696a1cac4422c3a0101 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 10 May 2019 21:06:48 +0200 Subject: [PATCH] Add a wait to avoid a transient issue on OCSP status in oldest tests --- .../certbot_integration_tests/certbot_tests/test_main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py index 748b7699e..5ce19dcb8 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -5,6 +5,7 @@ import os import re import shutil import subprocess +import time from os.path import join, exists import pytest @@ -567,6 +568,9 @@ def test_ocsp_status_live(context): # OSCP 2: Check live certificate OCSP status (REVOKED) context.certbot(['revoke', '--cert-name', cert, '--no-delete-after-revoke']) + # Sometimes in oldest tests (using openssl binary and not cryptography), the OCSP status is + # not seen immediately by Certbot as invalid. Waiting few seconds solves this transient issue. + time.sleep(5) output = context.certbot(['certificates']) assert output.count('INVALID') == 1, 'Expected {0} to be INVALID'.format(cert)