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 {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
layerStore := &mockLayerStore{make(map[layer.ChainID]*mockLayer)}

View file

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