Commit 7b462d34 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Vincent Pelletier

tests: Fix testCaucasedCertRenewal.

Reference value is pre-timeshift, so it will immediately differ but for the
wrong reason.
parent 1a76d3f8
......@@ -1247,7 +1247,7 @@ class CaucaseTest(unittest.TestCase):
).fetchall()
self._stopServer()
crt_pem, key_pem, _ = reference_key_pair_result = utils.getKeyPair(
crt_pem, key_pem, _ = utils.getKeyPair(
self._server_key,
)
with open(self._server_key, 'w') as server_key_file:
......@@ -1266,9 +1266,10 @@ class CaucaseTest(unittest.TestCase):
delta=datetime.timedelta(20, 0)
)
))
reference_server_key = open(self._server_key).read()
self._startServer()
if not retry(
lambda: utils.getKeyPair(self._server_key) != reference_key_pair_result,
lambda: open(self._server_key).read() != reference_server_key,
):
raise AssertionError('Server did not renew its key pair within 1 second')
# But user still trusts the server
......
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