Skip to content

Commit

Permalink
Update test_ssh_proto.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Dec 27, 2024
1 parent 0b9517c commit 080ed8e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_ssh_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,19 @@ def test_tcpip_forward(
user, ssh_target = setup_user_and_target(
processes, shared_wg, wg_c_ed25519_pubkey
)
fw_port = alloc_port()
pf_client = processes.start_ssh_client(
f"{user.username}:{ssh_target.name}@localhost",
"-p",
str(shared_wg.ssh_port),
"-v",
*common_args,
"-R",
"1234:github.com:443",
f"{fw_port}:www.google.com:443",
"-N",
password="123",
)
time.sleep(5)
# time.sleep(5)
ssh_client = processes.start_ssh_client(
f"{user.username}:{ssh_target.name}@localhost",
"-p",
Expand All @@ -213,13 +214,14 @@ def test_tcpip_forward(
*common_args,
"curl",
"-vk",
"-H", "Host: github.com",
"https://localhost:1234",
"--http1.1",
"-H", "Host: www.google.com",
f"https://localhost:{fw_port}",
password="123",
)
output = ssh_client.communicate(timeout=timeout)[0]
assert ssh_client.returncode == 0
assert b"<html>" in output
assert b"</html>" in output
pf_client.kill()

def test_shell(
Expand Down

0 comments on commit 080ed8e

Please sign in to comment.