Skip to content

Commit

Permalink
s3store: Replace own multi-error implementation with errors.Join
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Oct 4, 2024
1 parent 8d43cf2 commit 9779a84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
14 changes: 0 additions & 14 deletions pkg/s3store/multi_error.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/s3store/s3store.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ func (upload s3Upload) Terminate(ctx context.Context) error {
wg.Wait()

if len(errs) > 0 {
return newMultiError(errs)
return errors.Join(errs...)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/s3store/s3store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ func TestTerminateWithErrors(t *testing.T) {
assert.Nil(err)

err = store.AsTerminatableUpload(upload).Terminate(context.Background())
assert.Equal("Multiple errors occurred:\n\tAWS S3 Error (hello) for object uploadId: it's me.\n", err.Error())
assert.Equal("AWS S3 Error (hello) for object uploadId: it's me.", err.Error())
}

func TestConcatUploadsUsingMultipart(t *testing.T) {
Expand Down

0 comments on commit 9779a84

Please sign in to comment.