test: give the tree-local IndexerSettings fixtures distinct field values

Sonarr and Lidarr each keep their own copy of the shared fixture, both with minimum_age and retention set to 1, so transposing those two fields stayed invisible in either tree. Radarr built its fixture from IndexerSettings::default(), leaving availability_delay, maximum_size, minimum_age and retention all 0: four mutually transposable fields, none of which could distinguish a threaded value from a hardcoded 0.

The no-op guard test seeded IndexerSettings::default() as its sentinel, which cannot show whether the guard held or the field was simply never written. It now seeds a distinct stale_indexer_settings(), mirroring the Readarr convention.

Verified by transposing minimum_age and retention in the Lidarr indexer settings UI, now caught by its snapshot, and by inverting the Radarr no-op guard, now caught by both GetAllIndexerSettings tests.
This commit is contained in:
Dark-Alex-17 committed 2026-09-09 16:38:36 -06:00
1 parent d08f7d4b4e
commit f99d4f61f4
6 files changed
+54 -35

No files matched your search

@@ -274,9 +274,9 @@ pub(in crate::handlers::sonarr_handlers) mod utils {
pub fn indexer_settings() -> IndexerSettings {
IndexerSettings {
id: 1,
minimum_age: 1,
retention: 1,
id: 7,
minimum_age: 13,
retention: 21,
maximum_size: 12345,
rss_sync_interval: 60,
}