Skip to content

Commit

Permalink
daemon: fix TestVerifyPlatformContainerResources not capturing variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thaJeztah committed Oct 20, 2021
1 parent c87b941 commit 0c88740
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions daemon/daemon_unix_test.go
Expand Up @@ -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)
Expand Down

0 comments on commit 0c88740

Please sign in to comment.