Skip to content

Commit

Permalink
Update python version (#4500)
Browse files Browse the repository at this point in the history
  • Loading branch information
vepatel authored Oct 11, 2023
1 parent f9bedf2 commit 801746a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
14 changes: 8 additions & 6 deletions tests/suite/test_transport_server_tcp_load_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 801746a

Please sign in to comment.