Skip to content

bug(tests): simple_terminal.e2e_test.py WebSocket URL missing https→wss protocol upgrade #3748

@mrveiss

Description

@mrveiss

Problem

In autobot-backend/api/simple_terminal.e2e_test.py, the WebSocket URL is constructed by replacing http:// with ws://:

ws_url = base_url.replace('http://', 'ws://')

This does not handle https://wss://. When AUTOBOT_TEST_BACKEND_URL is set to an HTTPS endpoint (e.g. staging/prod), the URL silently stays as https://... and the WebSocket connection fails.

Fix

ws_url = base_url.replace('https://', 'wss://').replace('http://', 'ws://')

Why

Discovered during code review of PR #3727 (scored 75 — real but infrequent in practice).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions