Testing¶
Unit tests (Rust)¶
Tests live next to the code, in #[cfg(test)] modules: 76 of them.
They cover:
| Area | Examples |
|---|---|
| Auth and crypto | password hashing, sealing and opening AI keys |
| Permissions | role ordering and access rules |
| Storage | Range parsing (filesystem), the SigV4 signer, downloads signed for the bucket but sent through the download proxy |
| Media | silence detection parsing, loudness parsing; with ffmpeg installed, real recordings are made, measured, cut and checked for silence (ai/audio.rs, and seekable.rs measuring a file that has no length in its header) |
| Configuration | the storage size taken for a Backblaze bucket |
| AI | catalogue rules (each model does both jobs), timing anchoring, JSON extraction, chapter cleaning, Gemini error handling, OpenAI-compatible JSON mode and streamed answers |
| the HTML template (links, escaping) and its text twin | |
| Web | link-preview cards, durations |
| Routes | comments, shares, videos helpers |
Run them:
Lint and format:
End-to-end smoke test¶
scripts/smoke.sh [base-url] drives a running instance with curl and
checks the main flows:
- health, accounts and workspaces;
- uploads (whole and while recording) and Range requests;
- comments, invitations and roles, private videos;
- link previews, sharing and revocation;
- insights, moments, notifications and search;
- transcripts and summaries, AI settings;
- bulk delete.
Needs updating
smoke.sh (and seed-demo.sh) were written before sign-up required the
emailed 6-digit code. They call POST /api/auth/register and expect to
be signed in, but that call now only sends a code, and the scripts never
call /api/auth/register/verify. They therefore stop at the account
step on every instance until they are taught to read and send the code.
Manual checks¶
web/assets/_mp4check.htmlprints which recording formats the current browser'sMediaRecordersupports./assets/version.txtshows which commit a deployed instance is running.