Skip to content

e2e: add qa agent support and e2e test for local qa testing#2951

Merged
packethog merged 1 commit intomainfrom
feat/qa-e2e-test
Feb 13, 2026
Merged

e2e: add qa agent support and e2e test for local qa testing#2951
packethog merged 1 commit intomainfrom
feat/qa-e2e-test

Conversation

@packethog
Copy link
Contributor

Summary of Changes

  • Add QA agent support to the E2E Docker devnet so the QA client library can be exercised locally against Docker containers, not just remote environments
  • Build and package doublezero-qaagent in the base and client Docker images
  • Start QA agent conditionally in client entrypoint when DZ_QAAGENT_ENABLE=true, with crash detection on startup
  • Extend devnet ClientSpec with EnableQAAgent and QAAgentPort fields, handling port mapping and state recovery
  • Add SetPublicIP() and ClientIP to qa.Client to override auto-detected IPs in E2E containers where multiple network interfaces cause incorrect detection
  • Pass ClientIp through the ConnectUnicast gRPC request for correct CYOA network addressing
  • Accept "localnet" as a valid environment in the QA TestMain
  • Add TestE2E_QAAgent_UnicastConnectivity — a new E2E test validating the full QA agent lifecycle: connect via QA agent, wait for status, wait for cross-exchange routes, ping bidirectionally, disconnect
  • No CHANGELOG update needed — this is internal E2E test infrastructure

Testing Verification

  • TestE2E_QAAgent_UnicastConnectivity passes end-to-end (219.50s) against a local Docker devnet with two devices in different exchanges and two QA-agent-enabled clients
  • go vet -tags e2e ./e2e/... passes cleanly
  • golangci-lint run passes on all changed files (3 pre-existing issues in unrelated files)
  • Verified QA agent starts inside client containers, gRPC port is correctly mapped to host, and crash detection works in entrypoint

add QA agent binary build, container packaging, and startup logic so
the QA client library can be exercised against the local Docker devnet.
the new TestE2E_QAAgent_UnicastConnectivity test validates the full
lifecycle: connect via QA agent, wait for status, wait for routes,
ping, disconnect.

key changes:
- build and package doublezero-qaagent in base and client images
- start QA agent in client entrypoint with crash detection
- add EnableQAAgent/QAAgentPort to devnet ClientSpec with port mapping
- add SetPublicIP and ClientIP to qa.Client for CYOA IP overrides
- pass ClientIp through ConnectUnicast request
- accept "localnet" as valid env in qa TestMain
@packethog packethog self-assigned this Feb 12, 2026
@packethog packethog marked this pull request as ready for review February 12, 2026 23:37
@packethog packethog requested a review from snormore February 12, 2026 23:37
@packethog packethog merged commit 1107b41 into main Feb 13, 2026
38 of 42 checks passed
@packethog packethog deleted the feat/qa-e2e-test branch February 13, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants