Skip to content

test(e2e): run the edge tunnel test over TLS - #4486

Open
politerealism wants to merge 1 commit into
NVIDIA:mainfrom
politerealism:test/3712-edge-tunnel-visible-skip/politerealism
Open

politerealism wants to merge 1 commit into
NVIDIA:mainfrom
politerealism:test/3712-edge-tunnel-visible-skip/politerealism

Conversation

@politerealism

@politerealism politerealism commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

ws_tunnel_status_through_edge_proxy returned early, and so reported success, whenever it could not set up its own preconditions. In every lane that starts its own gateway it could not, so it never exercised the WebSocket tunnel. This makes it work against a TLS gateway, makes it fail when it can't, and moves it behind a feature flag so it only runs where the gateway supports it.

Related Issue

Contributes to #3712. No separate issue: this is a test-only change that fixes a false pass.

Changes

  • Read the gateway endpoint from the registered gateway metadata, instead of scraping gateway info. The old lookup never matched, because the URL is on the Server: line.
  • The CLI only tunnels over https://, so the old plaintext requirement could never have exercised the tunnel. The test now needs an https:// gateway and fails with a clear message otherwise.
  • For a gateway with a registered CA, point the CLI at it with SSL_CERT_FILE, because the tunnel client uses the system trust store. With no registered CA it uses the system store.
  • Replace the silent early returns with failures. The test also requires the CLI's debug log to show WebSocket connected to edge, so a healthy status that bypassed the tunnel cannot pass. This is the one place that depends on a diagnostic line, which RFC 0016 discourages for conformance tests.
  • Add an e2e-edge-tunnel feature, enabled by e2e-docker and e2e-podman. Kubernetes and VM can't exercise the test, so they no longer compile it. gateway_status_reports_healthy still runs everywhere.

Testing

  • mise run pre-commit passes
  • OPENSHELL_E2E_PODMAN_TEST=edge_tunnel_e2e mise run e2e:podman on rootless Podman with a TLS gateway and the tunnel enabled: both tests in edge_tunnel_e2e pass.
  • Negative controls on the same gateway: the test fails with UnknownIssuer when the CA isn't trusted, fails at the health precondition for a bad gateway, still passes with an inherited RUST_LOG=warn, and a direct status without the tunnel exits 0 but has no handshake line.
  • Not run: the Docker lane (no Docker on my machine) and macOS. SSL_CERT_FILE is read before the platform store in the locked rustls-native-certs (0.8.3), so it should behave the same on macOS.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable)

@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

ws_tunnel_status_through_edge_proxy returned early, and so reported
success, whenever it could not set up its own preconditions. It could
not in any lane that starts its own gateway, so it never exercised the
WebSocket tunnel:

- It looked for the gateway URL on a `gateway info` line that mentions
  "endpoint" or "gateway", but the URL is printed on the `Server:` line.
- It required a plaintext endpoint, but the CLI only tunnels over
  https://, and those lanes register an mTLS gateway at an https://
  endpoint.

Read the endpoint from the registered gateway metadata instead of
scraping `gateway info`. For a gateway with a registered CA, trust it by
pointing the CLI at it with SSL_CERT_FILE, since the tunnel client uses
the system trust store; otherwise use the system store. Fail, instead of
returning early, when the gateway is unhealthy or not https://, and
require the CLI's debug log to show the completed WebSocket handshake so
a status that bypassed the tunnel cannot pass.

The test needs a gateway with the WebSocket tunnel enabled, so move it
behind a new e2e-edge-tunnel feature that the docker and podman lanes
enable. The Kubernetes and VM lanes cannot exercise it and no longer
compile it.

Contributes to NVIDIA#3712

Signed-off-by: politerealism <burdcat17@gmail.com>
@politerealism
politerealism force-pushed the test/3712-edge-tunnel-visible-skip/politerealism branch from 7933fb4 to c55df65 Compare October 13, 2026 17:57
@politerealism politerealism changed the title test(e2e): make the edge tunnel test failure visible test(e2e): run the edge tunnel test over TLS Oct 13, 2026
@politerealism

Copy link
Copy Markdown
Contributor Author

@elezar a few things I'd like your eyes on, in case you have time.

  1. Docker and macOS. I could only run this on rootless Podman. If you can, could you try it on Docker (OPENSHELL_E2E_DOCKER_TEST=edge_tunnel_e2e mise run e2e:docker) and on a Mac? The Mac part is the SSL_CERT_FILE trust handling, which I expect to work but haven't seen.
  2. Feature gate. The test needs a gateway with the tunnel enabled, so I put it behind e2e-edge-tunnel, which e2e-docker and e2e-podman enable. That looks like a feature test under RFC 0016, but I'd like to hear if you'd rather have it somewhere else. test(conformance): move scenario files into Cargo tests #4120 owns the layout, so I haven't pre-empted it.
  3. Log assertion. Requiring the CLI's debug log line is the one place this leans on a diagnostic. Without it, a CLI regression that stopped using the tunnel could still pass. I can drop it if you prefer.
  4. Plaintext endpoint mode. The lane scripts document OPENSHELL_GATEWAY_ENDPOINT=http://… for reusing an existing plaintext gateway. A full-suite run in that mode now fails this test, with a clear message, because plaintext can't use the tunnel. I found nothing in CI that uses that mode. Should the lane scripts drop the feature in endpoint mode?

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