also looking at this
fix: hydrate durable registry snapshots before serving writes
#244
11 files
+202
-35
| @@ -8,6 +8,7 @@ | ||
| 8 | 8 | * starts empty. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | import { S3RequestError } from './storage/aws-client' | |
| 11 | 12 | import { describe, expect, it } from 'bun:test' |
| 12 | 13 | import { ObjectAnalytics } from './storage/object-analytics' |
| 13 | 14 | |
| @@ -17,7 +18,7 @@ function mockBucket() { | ||
| 17 | 18 | async getObjectBuffer(_bucket: string, key: string): Promise<Buffer> { |
| 18 | 19 | const v = store.get(key) |
| 19 | 20 | if (!v) |
| 20 | throw new Error('S3 GET failed: 404 Not Found') | |
| 21 | throw new S3RequestError('GET', 404, 'NoSuchKey') | |
| 21 | 22 | return v |
| 22 | 23 | }, |
| 23 | 24 | async putObject(o: { bucket: string, key: string, body: Buffer | string }): Promise<void> { |