From 4121cf9df313ee111c01fde1f255d010c8d941cd Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 14 Feb 2025 19:01:57 +0100 Subject: all: remove loop variables scoping --- pkg/bisect/bisect_test.go | 4 ---- pkg/bisect/minimize/slice_test.go | 1 - 2 files changed, 5 deletions(-) (limited to 'pkg/bisect') diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go index 7d251c9e7..d09e6804e 100644 --- a/pkg/bisect/bisect_test.go +++ b/pkg/bisect/bisect_test.go @@ -732,7 +732,6 @@ func TestBisectionResults(t *testing.T) { repoCache := make(chan string, len(bisectionTests)) t.Run("group", func(tt *testing.T) { for _, test := range bisectionTests { - test := test tt.Run(test.name, func(t *testing.T) { t.Parallel() checkTest(t, test) @@ -889,7 +888,6 @@ func TestBisectVerdict(t *testing.T) { } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { sum := test.good + test.bad + test.infra + test.skip assert.Equal(t, test.total, sum) @@ -1008,7 +1006,6 @@ func TestMostFrequentReport(t *testing.T) { }, } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { rep, types, other := mostFrequentReports(test.reports) assert.ElementsMatch(t, types, test.types) @@ -1066,7 +1063,6 @@ func TestPickReleaseTags(t *testing.T) { }, } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { ret := pickReleaseTags(append([]string{}, test.tags...)) assert.Equal(t, test.ret, ret) diff --git a/pkg/bisect/minimize/slice_test.go b/pkg/bisect/minimize/slice_test.go index cd6ec37c6..3a5e5e178 100644 --- a/pkg/bisect/minimize/slice_test.go +++ b/pkg/bisect/minimize/slice_test.go @@ -112,7 +112,6 @@ func TestBisectRandomSlice(t *testing.T) { func BenchmarkSplits(b *testing.B) { for _, guilty := range []int{1, 2, 3, 4} { - guilty := guilty b.Run(fmt.Sprintf("%d_guilty", guilty), func(b *testing.B) { var sum int for i := 0; i < b.N; i++ { -- cgit mrf-deployment