Merge pull request #42666 from rvolosatovs/fix_test_closures
Fix incorrect loop variable usage in parallel test closures
This commit is contained in:
commit
4a3dea5e13
4 changed files with 5 additions and 1 deletions
|
@ -13,12 +13,12 @@ func TestContainerInvalidJSON(t *testing.T) {
|
|||
defer setupTest(t)()
|
||||
|
||||
endpoints := []string{
|
||||
"/containers/foobar/copy",
|
||||
"/containers/foobar/exec",
|
||||
"/exec/foobar/start",
|
||||
}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep := ep
|
||||
t.Run(ep, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ func TestNetworkInvalidJSON(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep := ep
|
||||
t.Run(ep, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
@ -105,6 +106,7 @@ func TestNetworkList(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep := ep
|
||||
t.Run(ep, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ func TestPluginInvalidJSON(t *testing.T) {
|
|||
endpoints := []string{"/plugins/foobar/set"}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep := ep
|
||||
t.Run(ep, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ func TestVolumesInvalidJSON(t *testing.T) {
|
|||
endpoints := []string{"/volumes/create"}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep := ep
|
||||
t.Run(ep, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue