mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove unnecessary redeclarations in for loops (#18440)
This commit is contained in:
@@ -243,7 +243,6 @@ func TestGroupSyncTable(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
// The final test, "AllTogether", cannot run in parallel.
|
||||
// These tests are nearly instant using the memory db, so
|
||||
// this is still fast without being in parallel.
|
||||
@@ -341,8 +340,6 @@ func TestGroupSyncTable(t *testing.T) {
|
||||
})
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
orgID := uuid.New()
|
||||
SetupOrganization(t, s, db, user, orgID, tc)
|
||||
asserts = append(asserts, func(t *testing.T) {
|
||||
@@ -523,7 +520,6 @@ func TestApplyGroupDifference(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCase {
|
||||
tc := tc
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -713,7 +709,6 @@ func TestExpectedGroupEqual(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -159,7 +159,6 @@ func TestParseStringSliceClaim(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ func TestRoleSyncTable(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
// The final test, "AllTogether", cannot run in parallel.
|
||||
// These tests are nearly instant using the memory db, so
|
||||
// this is still fast without being in parallel.
|
||||
@@ -248,8 +247,6 @@ func TestRoleSyncTable(t *testing.T) {
|
||||
var asserts []func(t *testing.T)
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
orgID := uuid.New()
|
||||
SetupOrganization(t, s, db, user, orgID, tc)
|
||||
asserts = append(asserts, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user