Skip to content

test(e2e): make the local QSS fixture port configurable (QUIET_QSS_PORT) - #3715

Open
holmesworcester wants to merge 2 commits into
developfrom
test/qss-port-from-env
Open

holmesworcester wants to merge 2 commits into
developfrom
test/qss-port-from-env

Conversation

@holmesworcester

Copy link
Copy Markdown
Collaborator

Sessions that share a host each need their own local QSS fixture, but the Appium harness, its community helpers, the Android adb reverse route and the QSS-only backend all hardcoded port 3003.

Changes

  • New packages/mobile/e2e/utils/qssPort.cjs: QUIET_QSS_PORT (default 3003, valid range 1024-65535) and the matching ws://localhost:<port> endpoint.
  • qssCommunity.cjs (endpoint, fixture manifest check, health URL), androidProcesses.cjs and appium/mobile.mjs (adb reverse tcp:<port> tcp:<port>) use it. ci-android.sh / ci-ios.sh pass it to fixture.py --port.
  • backend/e2e/qss-only/mode.cjs accepts ws://localhost:<1024-65535> plus the staging endpoint. Other hosts, 127.0.0.1, wss://localhost and privileged ports are still refused.
  • fixture.py already took --port; the qss-e2e README now documents running on another port (the clients bake the endpoint in, so builds use env-file copies with the port changed).

Tests

  • New packages/mobile/scripts/qss-port.test.cjs: default and validation, the Android route and the community harness with a non-default port (3166, run in a child process), and the QSS-only endpoint allow/deny list. It is run by the iOS e2e and Android notification workflows next to the existing harness tests.
  • Fails against the old sources (3 of 4 cases), passes now. Existing qss-community-harness, android-qss-harness, notification-android-workflow, e2e-ios-workflow and qss-only.test.mjs still pass.
  • Also exercised end to end locally: the Appium test:onboarding lane (Android emulator, desktop peer, local QSS) passes with the fixture on 3066.
  • The default lane is unchanged (3003), so CI behaviour does not change.

🤖 Generated with Claude Code

…S_PORT

Sessions that share a host each need their own QSS fixture, but the Appium and
community harness, the Android adb reverse route and the QSS-only backend all
hardcoded port 3003. QUIET_QSS_PORT (default 3003, 1024-65535) now selects the
loopback port; the QSS-only backend accepts ws://localhost:<port> for any such
port. Adds a unit test that runs with a non-default port and wires it into the
workflows that already run the sibling harness tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant