Skip to content

Commit

Permalink
Add a couple more debug log items
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Feb 15, 2024
1 parent 7ef93f1 commit 30f442f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration-tests/test_vnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,18 @@ def test_vnc_screenshot(container, image_diff, unused_tcp_port):
f'ws://{origin}/desktop-websockify/?token={token}',
]
)
print(f"websocat proxying 127.0.0.1:{unused_tcp_port} to VNC server")
try:
# :: is used to indicate port, as that is what VNC expects.
# A single : is used to indicate display number. In our case, we
# do not use multiple displays so no need to specify that.
with api.connect(
f'127.0.0.1::{unused_tcp_port}'
) as client, tempfile.TemporaryDirectory() as d:
screenshot_target = Path(d) / "screenshot.jpeg"
print("Connected to VNC server. Attempting to capture screenshot...")
# Wait a couple of seconds for the desktop to fully render
time.sleep(5)
screenshot_target = Path(d) / "screenshot.jpeg"
client.captureScreen(str(screenshot_target))

# This asserts if the images are different, so test will fail
Expand Down

0 comments on commit 30f442f

Please sign in to comment.