1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

daemon: fix TestVerifyPlatformContainerResources not capturing variable

This test runs with t.Parallel() _and_ uses subtests, but didn't capture
the `tc` variable, which potentialy (likely) makes it test the same testcase
multiple times.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-09-22 17:12:45 +02:00
parent c87b9416df
commit 0c887404a8
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -356,6 +356,7 @@ func TestVerifyPlatformContainerResources(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
warnings, err := verifyPlatformContainerResources(&tc.resources, &tc.sysInfo, tc.update)