feat(readarr): add the Readarr health check network call
Inhabit ReadarrEvent with its first variant, HealthCheck, mapped to GET /health, and add get_readarr_healthcheck alongside the equivalent Lidarr, Radarr, and Sonarr fetchers. The call is internal only and has no CLI surface, matching the other three servarrs; it exists so that an unreachable instance surfaces an error banner on tick. The healthcheck fetcher lives in readarr_network/mod.rs rather than a submodule, so its tests live in readarr_network_tests.rs next to the resource() and NetworkEvent conversion tests, mirroring Lidarr. MockServarrApi::build_for matched NetworkEvent by value with no Radarr fallback arm. It compiled only while ReadarrEvent was uninhabited and no value could reach it; the first variant makes the match non exhaustive, so it now assigns the config to the Readarr server tab.
This commit is contained in:
3 files changed
+87
-4
No files matched your search
@@ -992,6 +992,7 @@ pub(in crate::network) mod test_utils {
|
||||
NetworkEvent::Radarr(_) => app.server_tabs.tabs[0].config = Some(servarr_config),
|
||||
NetworkEvent::Sonarr(_) => app.server_tabs.tabs[1].config = Some(servarr_config),
|
||||
NetworkEvent::Lidarr(_) => app.server_tabs.tabs[2].config = Some(servarr_config),
|
||||
NetworkEvent::Readarr(_) => app.server_tabs.tabs[3].config = Some(servarr_config),
|
||||
}
|
||||
|
||||
let app_arc = Arc::new(Mutex::new(app));
|
||||
|
||||
Reference in new issue
Block a user