diff --git a/tests/github/pki_insecure_client.py b/tests/github/pki_insecure_client.py index 100b46ad58..10d80151b0 100644 --- a/tests/github/pki_insecure_client.py +++ b/tests/github/pki_insecure_client.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 from pathlib import Path import time +import logging import sys import shutil import subprocess @@ -17,8 +18,7 @@ CA_PASSWORD = 'qwerty' DIRECTOR_SUBJECT_NAME = 'localhost' WORKSPACE_PATH = Path('tests/github/interactive_api_director/experiments/pytorch_kvasir_unet/') -EXPECTED_ERROR = ('Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:' - 'SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.') +EXPECTED_ERROR = ('Handshake failed with fatal error') def start_ca_server(): @@ -135,9 +135,8 @@ def start_envoy(tls=False): # Expectation is that secure server won't let insecure client connect while True: tmp = director.stderr.readline().decode('utf-8') - if tmp == '': - sys.exit(1) if EXPECTED_ERROR in tmp: + print('Handshake failed for insecure connections as expected.') break finally: director.kill()