Skip to content

Commit 029f829

Browse files
authored
Merge branch 'main' into dependabot/go_modules/github.com/go-chi/chi/v5-5.2.2
2 parents 750cb4a + 725bc37 commit 029f829

File tree

247 files changed

+1569
-935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+1569
-935
lines changed

agent/agent_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ func TestAgent_Stats_SSH(t *testing.T) {
130130
t.Parallel()
131131

132132
for _, port := range sshPorts {
133-
port := port
134133
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
135134
t.Parallel()
136135

@@ -342,7 +341,6 @@ func TestAgent_SessionExec(t *testing.T) {
342341
t.Parallel()
343342

344343
for _, port := range sshPorts {
345-
port := port
346344
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
347345
t.Parallel()
348346

@@ -468,7 +466,6 @@ func TestAgent_SessionTTYShell(t *testing.T) {
468466
}
469467

470468
for _, port := range sshPorts {
471-
port := port
472469
t.Run(fmt.Sprintf("(%d)", port), func(t *testing.T) {
473470
t.Parallel()
474471

@@ -611,7 +608,6 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
611608
}
612609

613610
for _, test := range tests {
614-
test := test
615611
t.Run(test.name, func(t *testing.T) {
616612
t.Parallel()
617613
session := setupSSHSession(t, test.manifest, test.banner, func(fs afero.Fs) {
@@ -688,16 +684,13 @@ func TestAgent_Session_TTY_MOTD_Update(t *testing.T) {
688684

689685
//nolint:paralleltest // These tests need to swap the banner func.
690686
for _, port := range sshPorts {
691-
port := port
692-
693687
sshClient, err := conn.SSHClientOnPort(ctx, port)
694688
require.NoError(t, err)
695689
t.Cleanup(func() {
696690
_ = sshClient.Close()
697691
})
698692

699693
for i, test := range tests {
700-
test := test
701694
t.Run(fmt.Sprintf("(:%d)/%d", port, i), func(t *testing.T) {
702695
// Set new banner func and wait for the agent to call it to update the
703696
// banner.
@@ -1210,7 +1203,6 @@ func TestAgent_CoderEnvVars(t *testing.T) {
12101203
t.Parallel()
12111204

12121205
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_OWNER_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
1213-
key := key
12141206
t.Run(key, func(t *testing.T) {
12151207
t.Parallel()
12161208

@@ -1233,7 +1225,6 @@ func TestAgent_SSHConnectionEnvVars(t *testing.T) {
12331225
// For some reason this test produces a TTY locally and a non-TTY in CI
12341226
// so we don't test for the absence of SSH_TTY.
12351227
for _, key := range []string{"SSH_CONNECTION", "SSH_CLIENT"} {
1236-
key := key
12371228
t.Run(key, func(t *testing.T) {
12381229
t.Parallel()
12391230

@@ -1276,7 +1267,6 @@ func TestAgent_SSHConnectionLoginVars(t *testing.T) {
12761267
},
12771268
}
12781269
for _, tt := range tests {
1279-
tt := tt
12801270
t.Run(tt.key, func(t *testing.T) {
12811271
t.Parallel()
12821272

@@ -1796,7 +1786,6 @@ func TestAgent_ReconnectingPTY(t *testing.T) {
17961786
t.Setenv("LANG", "C")
17971787

17981788
for _, backendType := range backends {
1799-
backendType := backendType
18001789
t.Run(backendType, func(t *testing.T) {
18011790
if backendType == "Screen" {
18021791
if runtime.GOOS != "linux" {
@@ -2496,7 +2485,6 @@ func TestAgent_Dial(t *testing.T) {
24962485
}
24972486

24982487
for _, c := range cases {
2499-
c := c
25002488
t.Run(c.name, func(t *testing.T) {
25012489
t.Parallel()
25022490

agent/agentcontainers/containers_internal_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ func TestWrapDockerExec(t *testing.T) {
4141
},
4242
}
4343
for _, tt := range tests {
44-
tt := tt // appease the linter even though this isn't needed anymore
4544
t.Run(tt.name, func(t *testing.T) {
4645
t.Parallel()
4746
actualCmd, actualArgs := wrapDockerExec("my-container", tt.containerUser, tt.cmdArgs[0], tt.cmdArgs[1:]...)
@@ -54,7 +53,6 @@ func TestWrapDockerExec(t *testing.T) {
5453
func TestConvertDockerPort(t *testing.T) {
5554
t.Parallel()
5655

57-
//nolint:paralleltest // variable recapture no longer required
5856
for _, tc := range []struct {
5957
name string
6058
in string
@@ -101,7 +99,6 @@ func TestConvertDockerPort(t *testing.T) {
10199
expectError: "invalid port",
102100
},
103101
} {
104-
//nolint: paralleltest // variable recapture no longer required
105102
t.Run(tc.name, func(t *testing.T) {
106103
t.Parallel()
107104
actualPort, actualNetwork, actualErr := convertDockerPort(tc.in)
@@ -151,7 +148,6 @@ func TestConvertDockerVolume(t *testing.T) {
151148
expectError: "invalid volume",
152149
},
153150
} {
154-
tc := tc
155151
t.Run(tc.name, func(t *testing.T) {
156152
t.Parallel()
157153
})

agent/agentssh/x11_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ func Test_addXauthEntry(t *testing.T) {
228228
require.NoError(t, err)
229229

230230
for _, tt := range tests {
231-
tt := tt
232231
t.Run(tt.name, func(t *testing.T) {
233232
t.Parallel()
234233

agent/proto/compare_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ func TestLabelsEqual(t *testing.T) {
6767
eq: false,
6868
},
6969
} {
70-
tc := tc
7170
t.Run(tc.name, func(t *testing.T) {
7271
t.Parallel()
7372
require.Equal(t, tc.eq, proto.LabelsEqual(tc.a, tc.b))

agent/proto/resourcesmonitor/queue_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ func TestResourceMonitorQueue(t *testing.T) {
6565
}
6666

6767
for _, tt := range tests {
68-
tt := tt
69-
7068
t.Run(tt.name, func(t *testing.T) {
7169
t.Parallel()
7270
queue := resourcesmonitor.NewQueue(20)

agent/proto/resourcesmonitor/resources_monitor_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ func TestPushResourcesMonitoringWithConfig(t *testing.T) {
195195
}
196196

197197
for _, tt := range tests {
198-
tt := tt
199198
t.Run(tt.name, func(t *testing.T) {
200199
t.Parallel()
201200

apiversion/apiversion_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ func TestAPIVersionValidate(t *testing.T) {
7272
expectedError: "no longer supported",
7373
},
7474
} {
75-
tc := tc
7675
t.Run(tc.name, func(t *testing.T) {
7776
t.Parallel()
7877

buildinfo/buildinfo_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ func TestBuildInfo(t *testing.T) {
9393
}
9494

9595
for _, c := range cases {
96-
c := c
9796
t.Run(c.name, func(t *testing.T) {
9897
t.Parallel()
9998
require.Equal(t, c.expectMatch, buildinfo.VersionsMatch(c.v1, c.v2),

cli/agent_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func Test_extractPort(t *testing.T) {
5454
},
5555
}
5656
for _, tt := range tests {
57-
tt := tt
5857
t.Run(tt.name, func(t *testing.T) {
5958
t.Parallel()
6059
got, err := extractPort(tt.urlString)

cli/autoupdate_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ func TestAutoUpdate(t *testing.T) {
6262
}
6363

6464
for _, c := range cases {
65-
c := c
6665
t.Run(c.Name, func(t *testing.T) {
6766
t.Parallel()
6867
client := coderdtest.New(t, nil)

0 commit comments

Comments
 (0)