mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration: copy loop variable into parallel test closures
Discovered a few instances, where loop variable is incorrectly used within a test closure, which is marked as parallel. Few of these were actually loops over singleton slices, therefore the issue might not have surfaced there (yet), but it is good to fix there as well, as this is an incorrect pattern used across different tests. Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
This commit is contained in:
parent
471fd27709
commit
dd01abf9bf
4 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,7 @@ func TestContainerInvalidJSON(t *testing.T) {
|
|||
}
|
||||
|
||||
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…
Reference in a new issue