acc: converge ssh/connection tunnel test onto a local websocket route#5919
Closed
radakam wants to merge 2 commits into
Closed
acc: converge ssh/connection tunnel test onto a local websocket route#5919radakam wants to merge 2 commits into
radakam wants to merge 2 commits into
Conversation
Follow-up to #5907. The dedicated-cluster acceptance test only asserted the bootstrap job the CLI submits; the actual driver-proxy tunnel was covered separately by the Go proxy echo tests because the client hardcoded a wss:// scheme and the test server had no websocket route. Two changes let the local acceptance run exercise the tunnel end to end: - Product fix: derive the websocket scheme from the workspace host (http -> ws, else wss) instead of forcing wss, so the client can dial the plaintext local test server. Add a unit test for the URL builder. - Test server: add a raw (connection-hijacking) handler registration and a driver-proxy /ssh websocket route that echoes binary frames, standing in for the SSH tunnel server a real cluster runs. In-process, so it also works on Windows. acceptance/ssh/connection now runs a single `ssh connect --proxy` locally: it submits the same dedicated-cluster bootstrap job and pipes stdin/stdout over the tunnel, asserting both the job payload and the echoed bytes. Proxy mode skips the ssh subprocess, so it doesn't hang looping a handshake against the echo.
Apply the same convergence to the serverless-GPU acceptance test (follow-up to #5878, where the review asked to fold the two test styles into one acceptance test). Locally it now runs a single `ssh connect --proxy` that submits the same serverless-GPU bootstrap job and pipes stdin/stdout over the driver-proxy websocket echo route, asserting both the job payload and the echoed bytes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Follow-up to #5907. Converges the Go proxy echo test and the
ssh/connectionacceptance test into a single acceptance test that exercises the driver-proxy tunnel end to end locally.experimental/ssh/internal/client/websockets.go): derive the websocket scheme from the workspace host (http→ws, otherwisewss) instead of hardcodingwss, so the client can dial the plaintext local test server.libs/testserver): addRouter.HandleRaw(connection-hijacking registration) and a driver-proxy/sshwebsocket route that echoes binary frames, standing in for the tunnel server a real cluster runs. In-process, so it also works on Windows.acceptance/ssh/connectionnow runs a single localssh connect --proxy --cluster=...that submits the same dedicated-cluster bootstrap job and pipes stdin/stdout over the tunnel, asserting both the job payload and the echoed bytes. Proxy mode skips thesshsubprocess, so there's no hang looping a handshake against the echo.Tests
acceptance/ssh/connection(bootstrap job payload + tunnel echo overws://)TestBuildProxyWebsocketURL(ws/wssscheme selection)