Test quak backup end to end against a fake Ente server (closes #186)
check / check (push) Successful in 3m19s
check / check (push) Successful in 3m19s
test/cli/backup-end-to-end.test.ts runs backupCommand through run, as bin/quak.ts does, with the real loadSession reading a session saved after logging in, and every request answered by a fake of the Ente HTTP API serving data encrypted with libsodium. It covers the backup tree of an account with two albums of its own and one shared with it, a second run that downloads nothing, a download that succeeds after two 503s, a 404 recorded in failures.json with exit 1, a refresh answered 401 with exit 3, and --verify putting back an original changed on disk. The fake server and the account it logs in moved from the backup-metadata test into test/ente-server.ts, unchanged, so both tests use them. Model: opus-5-5
This commit was merged in pull request #191.
This commit is contained in:
@@ -850,7 +850,8 @@ The library's primary surface is the cache-backed `Library`; the lower-level
|
||||
`Client` sits underneath it and is covered by the Design sections above. The
|
||||
test suite is the canonical, executable documentation — `test/library/` and
|
||||
`test/client/usage.test.ts` walk most operations, `test/cli/backup.test.ts`
|
||||
walks `lib.backup()`, and `yarn test` verifies them.
|
||||
walks `lib.backup()`, `test/cli/backup-end-to-end.test.ts` runs `quak backup`
|
||||
against a fake of the Ente HTTP API, and `yarn test` verifies them.
|
||||
|
||||
### Opening a library
|
||||
|
||||
|
||||
Reference in New Issue
Block a user