Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea4de03

Browse files
chore: appease linter
1 parent1cc4903 commitea4de03

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

‎coderd/workspaceagents_internal_test.go‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import (
1313
"strings"
1414
"testing"
1515

16+
"github.com/go-chi/chi/v5"
17+
"github.com/google/uuid"
18+
"github.com/stretchr/testify/require"
19+
"go.uber.org/mock/gomock"
20+
1621
"cdr.dev/slog"
1722
"cdr.dev/slog/sloggers/slogtest"
1823
"github.com/coder/coder/v2/coderd/database"
@@ -28,10 +33,6 @@ import (
2833
"github.com/coder/coder/v2/tailnet/tailnettest"
2934
"github.com/coder/coder/v2/testutil"
3035
"github.com/coder/websocket"
31-
"github.com/go-chi/chi/v5"
32-
"github.com/google/uuid"
33-
"github.com/stretchr/testify/require"
34-
"go.uber.org/mock/gomock"
3536
)
3637

3738
typefakeAgentProviderstruct {
@@ -143,8 +144,11 @@ func TestWatchAgentContainers(t *testing.T) {
143144

144145
// And: Dial the WebSocket
145146
wsURL:=strings.Replace(srv.URL,"http://","ws://",1)
146-
conn,_,err:=websocket.Dial(ctx,fmt.Sprintf("%s/workspaceagents/%s/containers/watch",wsURL,agentID),nil)
147+
conn,resp,err:=websocket.Dial(ctx,fmt.Sprintf("%s/workspaceagents/%s/containers/watch",wsURL,agentID),nil)
147148
require.NoError(t,err)
149+
ifresp.Body!=nil {
150+
deferresp.Body.Close()
151+
}
148152

149153
// And: Create a streaming decoder
150154
decoder:=wsjson.NewDecoder[codersdk.WorkspaceAgentListContainersResponse](conn,websocket.MessageText,logger)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp