Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: comments
  • Loading branch information
DanielleMaywood committed Aug 18, 2025
commit fa0b97ea0c00560edd12f78fc6926e76ff093436
6 changes: 5 additions & 1 deletion coderd/workspaceagents_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func TestWatchAgentContainers(t *testing.T) {
t.Run("WebSocketClosesProperly", func(t *testing.T) {
t.Parallel()

// This test ensures that the agent containers `/watch` websocket can gracefully
// handle the underlying websocket unexpectedly closing. This test was created in
// response to this issue: https://github.com/coder/coder/issues/19372

var (
ctx = testutil.Context(t, testutil.WaitShort)
logger = slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Leveled(slog.LevelDebug).Named("coderd")
Expand Down Expand Up @@ -130,7 +134,7 @@ func TestWatchAgentContainers(t *testing.T) {
// And: Allow `db2dsk.WorkspaceAgent` to complete.
mCoordinator.EXPECT().Node(gomock.Any()).Return(nil)

// And: Allow `WatchContainers` to be called.
// And: Allow `WatchContainers` to be called, returing our `containersCh` channel.
mAgentConn.EXPECT().WatchContainers(gomock.Any(), gomock.Any()).
Return(containersCh, io.NopCloser(&bytes.Buffer{}), nil)

Expand Down
Loading