Merge pull request #45062 from corhere/backport-23.0/fix-loopclosure-test-bugs

[23.0 backport] Fix loop-closure bugs in tests
This commit is contained in:
Cory Snider 2023-02-22 16:31:13 -05:00 committed by GitHub
commit d74ef58c59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -379,7 +379,7 @@ func TestMaxDownloadAttempts(t *testing.T) {
name: "max-attempts=5, fail at 6th attempt",
simulateRetries: 6,
maxDownloadAttempts: 5,
expectedErr: "simulating download attempt 5/6",
expectedErr: "simulating download attempt 6/6",
},
{
name: "max-attempts=0, fail after 1 attempt",
@ -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)