docs(arr): sharpen the unconfigured provider lamp
Said 'not configured'; the branch is specifically about missing bootstrap credentials, and after #215 only a provider that needs them can reach it.
This commit is contained in:
@@ -275,8 +275,10 @@ async fn probe_subtitles(state: &AppState) -> SubtitleHealth {
|
||||
async fn probe_provider(state: &AppState, id: &str) -> ProviderCheck {
|
||||
let check = match state.subtitle_provider(id) {
|
||||
Some(provider) => check_from(provider.probe().await),
|
||||
// Only reachable for a provider that needs credentials: Podnapisi is
|
||||
// anonymous (#215) and is always attached, so it never lands here.
|
||||
None => Check::unconfigured(format!(
|
||||
"{id} is enabled but not configured — credentials are bootstrap config"
|
||||
"{id} is enabled but has no credentials — they are bootstrap config, not a setting"
|
||||
)),
|
||||
};
|
||||
ProviderCheck {
|
||||
@@ -485,9 +487,9 @@ mod tests {
|
||||
body["subtitles"]["providers"],
|
||||
serde_json::json!([
|
||||
{ "id": "opensubtitles", "status": "unconfigured",
|
||||
"detail": "opensubtitles is enabled but not configured — credentials are bootstrap config" },
|
||||
"detail": "opensubtitles is enabled but has no credentials — they are bootstrap config, not a setting" },
|
||||
{ "id": "podnapisi", "status": "unconfigured",
|
||||
"detail": "podnapisi is enabled but not configured — credentials are bootstrap config" },
|
||||
"detail": "podnapisi is enabled but has no credentials — they are bootstrap config, not a setting" },
|
||||
])
|
||||
);
|
||||
assert_eq!(body["status"], "degraded");
|
||||
|
||||
Reference in New Issue
Block a user