Skip to content

Commit

Permalink
Relax expected error check (securefederatedai#1036)
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista authored Aug 26, 2024
1 parent 7acc610 commit 829bbc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/github/pki_insecure_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
from pathlib import Path
import time
import logging
import sys
import shutil
import subprocess
Expand All @@ -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():
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 829bbc2

Please sign in to comment.