Files
vaultik/internal/storage/faultstore
sneak 43a49da515
check / check (pull_request) Successful in 2m55s
Add fault-injection tests for interruption and corruption (closes #72)
Introduce internal/storage/faultstore, a storage.Storer wrapper that
injects faults through the existing seam rather than patching production
code: an interrupted upload, a backend that reports success while
storing nothing, and corrupt or truncated reads.

Each test asserts the observable end state — index, destination, and
what the user is told — not just that an error came back. Two scenarios
expose real defects and are skipped, pointing to a tracking issue rather
than asserting today's wrong behavior: retry after an interrupted upload
(#148) and a disk-full restore
that leaves a truncated file at the target
(#163). Automatic repair of a
half-exported snapshot is left to the first.

The tests run serially because each calls log.Initialize, replacing the
global logger a concurrent backup reads.

Model: opus-4-8
2026-09-22 07:14:35 +00:00
..