Merge pull request #1860 from stevvooe/ignore-not-found
integration: ignore not found error on cleanup
This commit is contained in:
commit
96572395ad
@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/containerd/containerd/content"
|
||||
"github.com/containerd/containerd/content/testsuite"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@ -28,7 +29,14 @@ func newContentStore(ctx context.Context, root string) (content.Store, func() er
|
||||
}
|
||||
}
|
||||
return cs.Walk(ctx, func(info content.Info) error {
|
||||
return cs.Delete(ctx, info.Digest)
|
||||
if err := cs.Delete(ctx, info.Digest); err != nil {
|
||||
if errdefs.IsNotFound(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user