test(cmd): the uploads store double records the kind a job failed with
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,15 +20,17 @@ import (
|
|||||||
// fakeUploadsStore satisfies the store surface buildUploads needs, and counts the
|
// fakeUploadsStore satisfies the store surface buildUploads needs, and counts the
|
||||||
// start-up sweep.
|
// start-up sweep.
|
||||||
type fakeUploadsStore struct {
|
type fakeUploadsStore struct {
|
||||||
sweeps int
|
sweeps int
|
||||||
sweepErr error
|
sweepErr error
|
||||||
|
failedKinds []domain.UploadErrorKind
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *fakeUploadsStore) CreateUpload(context.Context, string, string, bool) (string, error) {
|
func (f *fakeUploadsStore) CreateUpload(context.Context, string, string, bool) (string, error) {
|
||||||
return "id", nil
|
return "id", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *fakeUploadsStore) FailUpload(context.Context, string, string, domain.UploadErrorKind) error {
|
func (f *fakeUploadsStore) FailUpload(_ context.Context, _, _ string, k domain.UploadErrorKind) error {
|
||||||
|
f.failedKinds = append(f.failedKinds, k)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user