Give the console's test store the conditional delete both production stores have
The store walks delete a record as the generation they read and never fall back to an unconditional delete. The console tests' store double could only delete unconditionally, so store destroy and purge refused to finish there. The production stores (S3 and directory) both delete conditionally.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 file changed,
+7
−0
internal/console/view_test.go+7 −0
diff --git a/internal/console/view_test.go b/internal/console/view_test.go| index 3465c9795..dd8ac6921 100644 |
| --- a/internal/console/view_test.go |
| +++ b/internal/console/view_test.go |
| @@ -43,6 +43,13 @@ func (d *deletableStore) Delete(_ context.Context, key string) error { |
| return nil |
| } |
| +// DeleteIfMatch forwards to the wrapped store. Both production stores |
| +// delete conditionally, and the store walks rely on it: a double that |
| +// could only delete unconditionally would make them refuse to finish. |
| +func (d *deletableStore) DeleteIfMatch(ctx context.Context, key, etag string) error { |
| + return release.DeleteIfMatch(ctx, d.Store, key, etag) |
| +} |
| + |
| // ListMod forwards to the wrapped store's ModLister. Both production stores |
| // (DirStore, S3Store) implement it; deletableStore's embedded field is |
| // declared as the release.Store INTERFACE, so Go's promotion rules only |