Skip to content

test(agent): e2e + registry + routing test suite#1772

Draft
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
masterfrom
feat/agent-tunnel-tests
Draft

test(agent): e2e + registry + routing test suite#1772
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
masterfrom
feat/agent-tunnel-tests

Conversation

@irvingoujAtDevolution
Copy link
Copy Markdown
Contributor

Summary

Adds the agent-tunnel test suite under testsuite/tests/agent_tunnel/:

  • integration.rs — full QUIC end-to-end (CA → enroll → mTLS → control stream → ConnectRequest → echo) plus the domain-routing variant
  • registry.rsAgentRegistry unit tests (online/offline timeouts, route epoch handling, domain advertisement persistence, agent-info snapshot)
  • routing.rsRoutePlan::resolve / try_route decision matrix (explicit jet_agent_id, subnet/domain match, fallback, offline filtering, no-handle paths)

Why split out

PR #1741 (the routing/upstream feature) keeps its diff focused on production code. Tests live here so a 924-line test scaffolding diff doesn't muddle the feature review.

Stack

Test plan

  • cargo test -p testsuite --test integration_tests agent_tunnel:: — 25/25 pass locally

@irvingoujAtDevolution irvingouj@Devolutions (irvingoujAtDevolution) changed the title test(agent-tunnel): e2e + registry + routing test suite test(agent): e2e + registry + routing test suite Apr 29, 2026
@irvingoujAtDevolution irvingouj@Devolutions (irvingoujAtDevolution) force-pushed the feat/quic-tunnel-2-routing branch 2 times, most recently from b4ec360 to a2b2ff5 Compare May 12, 2026 17:40
irvingouj@Devolutions (irvingoujAtDevolution) added a commit that referenced this pull request May 12, 2026
Address CBenoit's review on #1741: in addition to the `#[doc(hidden)]`
marker and the `_for_test` naming, gate `AgentPeer::set_last_seen_for_test`
and `set_received_at_for_test` behind `#[cfg(any(test, feature = "test-utils"))]`
so production builds of `devolutions-gateway` and `devolutions-agent` don't
compile these methods at all. Cross-crate test consumers (the workspace
`testsuite` crate carrying the agent-tunnel integration tests, in #1772)
opt in via `features = ["test-utils"]` on their `agent-tunnel` dev-dep.
Base automatically changed from feat/quic-tunnel-2-routing to master May 13, 2026 15:19
- testsuite/tests/agent_tunnel/integration.rs: full QUIC e2e (CA →
  enroll → mTLS → control stream → ConnectRequest → echo) and a
  domain-routing variant.
- testsuite/tests/agent_tunnel/registry.rs: AgentRegistry unit tests
  covering online/offline timeouts, route epoch handling (replace vs
  refresh vs ignore stale), domain advertisement persistence, and the
  agent-info snapshot.
- testsuite/tests/agent_tunnel/routing.rs: RoutePlan::resolve / try_route
  decision matrix — explicit jet_agent_id, subnet match, domain match,
  fallback to direct, offline filtering, and the no-handle paths.

Also includes the read_cert_chain rewrite from #1771 (needed for the
e2e tests to parse the rcgen-produced PEM); once #1771 lands this
collapses to just the test files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant