diff --git a/tests/Dockerfile b/tests/Dockerfile index adbc16924f..0eee205f10 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -2,7 +2,7 @@ # this is here so we can grab the latest version of kind and have dependabot keep it up to date FROM kindest/node:v1.28.0 -FROM python:3.11 +FROM python:3.12 RUN apt-get update \ && apt-get install -y curl git \ diff --git a/tests/suite/test_transport_server_tcp_load_balance.py b/tests/suite/test_transport_server_tcp_load_balance.py index 2f6f3e487b..7dcd1871bb 100644 --- a/tests/suite/test_transport_server_tcp_load_balance.py +++ b/tests/suite/test_transport_server_tcp_load_balance.py @@ -608,12 +608,14 @@ def test_secure_tcp_request_load_balanced( host = host.strip("[]") with socket.create_connection((host, port)) as sock: - with ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS) as ssock: - print(ssock.version()) - ssock.sendall(b"connect") - response = ssock.recv(4096) - endpoint = response.decode() - print(f"Connected securely to: {endpoint}") + ctx = ssl.SSLContext() + ctx.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 # only secure TLSv1_2+ is allowed + ssock = ctx.wrap_socket(sock) + print(ssock.version()) + ssock.sendall(b"connect") + response = ssock.recv(4096) + endpoint = response.decode() + print(f"Connected securely to: {endpoint}") self.restore_ts(kube_apis, transport_server_setup) delete_items_from_yaml(kube_apis, src_sec_yaml, transport_server_setup.namespace)