Skip to content

Commit 4213be6

Browse files
committed
test: use copyloopvar golint rule
fix golint fix
1 parent 32d5efc commit 4213be6

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

.github/workflows/static.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: golangci/golangci-lint-action@v6
1717
with:
1818
version: v1.64
19-
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,contextcheck --timeout=30m0s
19+
args: -E=gofmt,unused,ineffassign,revive,misspell,copyloopvar,asciicheck,bodyclose,contextcheck --timeout=30m0s
2020
verify-helm:
2121
name: Verify Helm
2222
runs-on: ubuntu-latest

pkg/nfs/controllerserver_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ func TestCreateVolume(t *testing.T) {
218218
}
219219

220220
for _, test := range cases {
221-
test := test //pin
222221
t.Run(test.name, func(t *testing.T) {
223222
// Setup
224223
cs := initTestController(t)
@@ -300,7 +299,6 @@ func TestDeleteVolume(t *testing.T) {
300299
}
301300

302301
for _, test := range cases {
303-
test := test //pin
304302
if runtime.GOOS == "windows" && !test.testOnWindows {
305303
continue
306304
}
@@ -386,7 +384,6 @@ func TestControllerGetCapabilities(t *testing.T) {
386384
}
387385

388386
for _, test := range cases {
389-
test := test //pin
390387
t.Run(test.desc, func(t *testing.T) {
391388
// Setup
392389
cs := initTestController(t)
@@ -526,7 +523,6 @@ func TestNfsVolFromId(t *testing.T) {
526523
}
527524

528525
for _, test := range cases {
529-
test := test //pin
530526
t.Run(test.name, func(t *testing.T) {
531527
resp, err := getNfsVolFromID(test.volumeID)
532528

pkg/nfs/utils_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func TestParseEndpoint(t *testing.T) {
6565
}
6666

6767
for _, test := range cases {
68-
test := test //pin
6968
t.Run(test.desc, func(t *testing.T) {
7069
proto, addr, err := ParseEndpoint(test.endpoint)
7170

0 commit comments

Comments
 (0)