Repository navigation
Conversation
Every write test asserted only that a mock was called with the right arguments and then resolved. Nothing fed a rejected write, so swallowing an error — dropping the await, or attaching .catch(() => undefined) — left the suite green on all five providers while writes silently failed. Six such mutations survived the previous suite; two were re-run against this one and both now fail. Adds a rejection test per write method across s3, gcs, azure and local, plus: - Azure getContainerClient was never asserted, so every operation could target the wrong container unnoticed. - Unicode payloads were untested — all fixtures were ASCII, so changing Azure's utf8 encoding to ascii passed. Covered for azure, gcs and the MinIO round trip. - The integration spec had no missing-key read. That is the real GetObject 404 path, the same error-shape class as the NoSuchKey/NotFound mismatch in #9, which mocks cannot catch. CI now runs the integration suite against MinIO. It is started as a step rather than a service container: services cannot pass a command and the minio image needs "server /data". Skipping by default locally is right; never running in CI is not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch 2 of the review findings. Stacked on #20; retarget to
mainonce that merges. Tests and CI only — no source changes.Write failures were never asserted
Every write test asserted that a mock was called with the right arguments, then resolved. Nothing fed a rejected write. So swallowing an error — dropping the
await, or attaching.catch(() => undefined)— left the suite green on all five providers while writes silently failed.Six such mutations survived the previous suite. Two re-run against this one:
no-floating-promisescatches a dropped await, but not a swallowed rejection, so lint was never the backstop here.Adds one rejection test per write method across s3, gcs, azure and local.
Three more holes
getContainerClientwas never asserted. Every operation could target the wrong container and the suite would stay green. The mock is hoisted so its argument can be checked againstAZURE_STORAGE_CONTAINER."content","hello"), so an encoding regression mangling non-ASCII bytes passed. Covered for azure, gcs, and as a real MinIO round trip including a unicode key.GetObject404 path, the same error-shape class as theNoSuchKey/NotFoundmismatch fixed in S3 provider: dead NoSuchKey checks, inconsistent timestamp fallback, validation ordering #9, which mocks by construction cannot catch. Added for bothgetAsBufferandgetAsStream.Integration spec: 6 → 9 tests.
MinIO now runs in CI
Skipping by default locally is right; never running in CI is not — that combination rots, and this repo already has one bug that only real I/O would have caught.
Started as a step, not a service container:
services:cannot pass a command and the minio image needsserver /data. My first attempt usedbitnami/minioas a service, which would have failed — that image no longer exists on Docker Hub. Verified the step-based version end to end locally: ready in ~4s, all 9 integration tests pass.Verification
Source restored bit-identical after the mutation runs (
git diffempty).