S033: tests for thumbs, tags, MusicBrainz, player, ssh, SFTP and MTP

Fixes: key passphrase retried up to three times; zero track/disc number reads as none.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-19 04:58:55 -06:00
commit 9ea6cc342c

View file

@ -267,5 +267,12 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Not done: press squeeze not drawn by software renderer (pressed == hover in PNGs); conflict/errors dialogs have no hook (not in matrix); single-sentence captions keep their periods; Material You pink-tinted surfaces kept (D-035) though unslop prefers neutral.
- Later: Network settings "Keep alive" subtitle elides (Setting subtitle should wrap); settings scrollbar sits tight to the switches.
## S033 — Tests: thumbs, tags, MusicBrainz, player, ssh, SFTP, MTP
- Done: `tests/` in five crates with tiny ffmpeg-made fixtures (flac, mp3, ogg, m4a, wav, mp4, png, jpg, svg; ~160 KB) and four test-only ed25519 keys in `tunal-net/tests/fixtures`. `tunal-thumbs`: cache naming/metadata, raster/SVG/cover/video, skips, known failures, size limit, priority and cancel, ffmpeg-missing in its own test binary (the probe is cached per process). `tunal-tags`: read/write/Keep/Clear/cover on five formats, merge, `set_all`; MusicBrainz and Cover Art Archive against a localhost mock (query escaping, user agent, redirects, 1 s spacing shared by clients, 503/429 backoff, give-up after 4); track matching. `tunal-player`: decode + waveform buckets, cache, cancel (no audio device). `tunal-net`: ssh config, known_hosts, and SFTP against an in-process russh server (host key unknown/once/always/changed/revoked, key/password/passphrase auth, list/stat/read/write/mkdir/rename/delete/symlink, reconnect). `tunal-devices`: PTP containers, datasets, dates, and session flows on the replay transport.
- Bugs fixed (with regression tests): a wrong key passphrase was asked only once instead of up to three times (`tunal-net/src/auth.rs`); clearing the track number of an MP3 left `0` (ID3 "0/12") that read back as track 0 (`tunal-tags/src/io.rs`: a zero track/disc number reads as none).
- Verified: build, clippy -D warnings, fmt --check, `cargo test --workspace`.
- Not done: `MtpLocation`/`IosLocation` not driven (no replay hook through the location layer); keyboard-interactive auth and the ssh agent path untested; `Player` engine itself needs an audio device, only waveforms are tested; MusicBrainz backoff tests really sleep (~30 s total).
- Later: video thumbnails of frames smaller than the edge are enlarged by ffmpeg (images are not): cap with `scale=min(...)`.
## Later
-