mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: remove unnecessary redeclarations in for loops (#18440)
This commit is contained in:
@ -1156,7 +1156,6 @@ func TestProxyByHostname(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@ -1394,7 +1393,6 @@ func TestGetUsers_IncludeSystem(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@ -1862,8 +1860,6 @@ func TestReadCustomRoles(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@ -2506,7 +2502,6 @@ func TestGetProvisionerJobsByIDsWithQueuePosition(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc // Capture loop variable to avoid data races
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
db, _ := dbtestutil.NewDB(t)
|
||||
@ -2947,7 +2942,6 @@ func TestGetUserStatusCounts(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tz := range timezones {
|
||||
tz := tz
|
||||
t.Run(tz, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@ -2995,7 +2989,6 @@ func TestGetUserStatusCounts(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
db, _ := dbtestutil.NewDB(t)
|
||||
@ -3163,7 +3156,6 @@ func TestGetUserStatusCounts(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
db, _ := dbtestutil.NewDB(t)
|
||||
@ -3296,7 +3288,6 @@ func TestGetUserStatusCounts(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
Reference in New Issue
Block a user