Add resilience tests

This commit is contained in:
Alexander
2026-07-01 13:07:05 +02:00
parent d001e81128
commit 9699da385b
6 changed files with 760 additions and 3 deletions
+12
View File
@@ -14,10 +14,13 @@ against the mountpoint.
```sh
just e2e # full suite (creates VM, runs tests, destroys VM)
KEEP=1 just e2e # keep VM + DB alive after run for debugging
just e2e-resilience # resilience suite (server stop/start, network partition, outage recovery)
```
## What it tests
### Functional suite (`just e2e`)
| Phase | Description |
| ------------ | ------------------------------------------------------- |
| structural | Virtual directory tree matches fixture tags |
@@ -29,6 +32,15 @@ KEEP=1 just e2e # keep VM + DB alive after run for debugging
| chunked write| Non-metadata writes don't corrupt tag structure |
| persistence | Tags survive client restart (DB restore path) |
### Resilience suite (`just e2e-resilience`)
| Scenario | Disruption | What it verifies |
| ----------------- | ----------------------------------- | -------------------------------------------------------- |
| server stop/start | `systemctl stop/start` in VM | EIO on uncached reads, cached reads survive, watcher resubscribes within 10s |
| network partition | `incus pause/start` (silent drop) | EIO within 10s (tonic 3s timeout × kernel readahead), watcher detects via HTTP/2 keepalive within 30s |
| cache resilience | server stop, all files pre-cached | All reads/writes from cache, no server contact needed |
| long outage | `incus pause` for 15s+ | Watcher detects via keepalive PING, resubscribes within 10s of recovery |
## Fixtures
`make-fixtures.sh` generates a deterministic library under `target/e2e/music/`: