mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-07 07:33:13 -04:00
chore: remove loop var references
This commit is contained in:
committed by
Ralf Haferkamp
parent
900ecf736e
commit
d0e3f14539
@@ -417,7 +417,6 @@ func TestParse_Spec(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -851,7 +850,6 @@ func TestParse_DateTimeRestrictionNode(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -909,7 +907,6 @@ func TestParse_Errors(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -964,7 +961,6 @@ func TestParse_DottedKey(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -1421,7 +1417,6 @@ func TestParse_Stress(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
|
||||
@@ -31,7 +31,6 @@ func TestNewAST(t *testing.T) {
|
||||
assert := tAssert.New(t)
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := kql.Builder{}.Build(tt.givenQuery)
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@ func TestJailJoin(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ var _ = Describe("ActivitylogService", func() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc // capture range variable
|
||||
Context(tc.Name, func() {
|
||||
JustBeforeEach(func() {
|
||||
getResource = func(_ context.Context, ref *provider.Reference) (*provider.ResourceInfo, error) {
|
||||
|
||||
@@ -129,7 +129,6 @@ func TestRegexSelector(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc // capture range variable
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
r := httptest.NewRequest("GET", "https://example.com", nil)
|
||||
nr := r.WithContext(tc.Context)
|
||||
|
||||
@@ -28,7 +28,6 @@ func TestCleanContent(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.given, func(t *testing.T) {
|
||||
Equal(t, tc.expect, content.CleanString(tc.given, "en"))
|
||||
})
|
||||
|
||||
@@ -87,7 +87,6 @@ func TestProcessorFor(t *testing.T) {
|
||||
assert := tAssert.New(t)
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run("", func(t *testing.T) {
|
||||
p, e := thumbnail.ProcessorFor(tt.id, tt.fileType)
|
||||
assert.Equal(p.ID(), tt.wantP.ID())
|
||||
|
||||
@@ -56,7 +56,6 @@ func TestFileSystem_BuildKey(t *testing.T) {
|
||||
assert := tAssert.New(t)
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run("", func(t *testing.T) {
|
||||
assert.Equal(s.BuildKey(tt.r), tt.want)
|
||||
})
|
||||
|
||||
@@ -100,8 +100,6 @@ func TestFileServer(t *testing.T) {
|
||||
expected: "some file content",
|
||||
},
|
||||
} {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user