Explorar o código

Merge pull request #42874 from thaJeztah/fix_TestVerifyPlatformContainerResources

daemon: fix TestVerifyPlatformContainerResources not capturing variable
Sebastiaan van Stijn %!s(int64=3) %!d(string=hai) anos
pai
achega
8f4d85801f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      daemon/daemon_unix_test.go

+ 1 - 0
daemon/daemon_unix_test.go

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