Merge pull request #3853 from dmcgowan/fix-content-test-cleanup-race

Fix cleanup error on content client test
This commit is contained in:
Wei Fu 2019-11-27 22:58:37 +08:00 committed by GitHub
commit 3a31ce267d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ func newContentStore(ctx context.Context, root string) (context.Context, content
return err
}
for _, st := range statuses {
if err := cs.Abort(ctx, st.Ref); err != nil {
if err := cs.Abort(ctx, st.Ref); err != nil && !errdefs.IsNotFound(err) {
return errors.Wrapf(err, "failed to abort %s", st.Ref)
}
}