Clean up loop captures in tests (#6592)
* Clean up loop captures * some more
This commit is contained in:
1 parent
acc7d629c8
commit
5e6c9eecbe
110 files changed
-284
No files matched your search
@@ -219,7 +219,6 @@ func TestValidateCreateRequest(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
req := &pbs.CreateAccountRequest{Item: tc.item}
|
||||
@@ -283,7 +282,6 @@ func TestValidateUpdateRequest(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
err := validateUpdateRequest(context.Background(), tc.req)
|
||||
|
||||
@@ -193,7 +193,6 @@ func TestTransformAuthenticateRequestAttributes(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
in := proto.Clone(c.input)
|
||||
@@ -418,7 +417,6 @@ func TestTransformAuthenticateResponseAttributes(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
in := proto.Clone(c.input)
|
||||
|
||||
@@ -124,7 +124,6 @@ func TestValidateCreateRequest(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc // capture range variable
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
req := &pbs.CreateManagedGroupRequest{Item: tc.item}
|
||||
@@ -198,7 +197,6 @@ func TestValidateUpdateRequest(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc // capture range variable
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
err := validateUpdateRequest(context.Background(), tc.req)
|
||||
|
||||
Reference in new issue
Block a user