Fix loop-closure bugs in tests

...which were flagged by golangci-lint v1.51.

Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Cory Snider 2023-02-03 12:27:37 -05:00
parent 02b8412572
commit 0c68b655f6
2 changed files with 2 additions and 0 deletions

View file

@ -389,6 +389,7 @@ func TestMaxDownloadAttempts(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()
layerStore := &mockLayerStore{make(map[layer.ChainID]*mockLayer)} layerStore := &mockLayerStore{make(map[layer.ChainID]*mockLayer)}

View file

@ -90,6 +90,7 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) {
client := testEnv.APIClient() client := testEnv.APIClient()
ctx := context.Background() ctx := context.Background()
for _, c := range cases { for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) { t.Run(c.name, func(t *testing.T) {
t.Parallel() t.Parallel()
dockerfile := []byte(c.dockerfile) dockerfile := []byte(c.dockerfile)