feat(readarr): fetch all indexers and expose them on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-09-01 16:59:57 -06:00
1 parent c94b2a40d0
commit be5826f2c4
7 files changed
+218 -2

No files matched your search

@@ -29,6 +29,7 @@ mod tests {
"authors",
"blocklist",
"disk-space",
"indexers",
"metadata-profiles",
"quality-profiles",
"queued-events",
@@ -656,6 +657,29 @@ mod tests {
assert_ok!(&result);
}
#[tokio::test]
async fn test_handle_list_indexers_command() {
let mut mock_network = MockNetworkTrait::new();
mock_network
.expect_handle_network_event()
.with(eq::<NetworkEvent>(ReadarrEvent::GetIndexers.into()))
.times(1)
.returning(|_| {
Ok(Serdeable::Readarr(ReadarrSerdeable::Value(
json!({"testResponse": "response"}),
)))
});
let app_arc = Arc::new(Mutex::new(App::test_default()));
let list_indexers_command = ReadarrListCommand::Indexers;
let result =
ReadarrListCommandHandler::with(&app_arc, list_indexers_command, &mut mock_network)
.handle()
.await;
assert_ok!(&result);
}
#[tokio::test]
async fn test_handle_list_logs_command() {
let expected_events = 1000;