Skip to main content

devboy_yougile/
liveness.rs

1//! YouGile [`LivenessProbe`] stub per ADR-021 §6.
2
3use async_trait::async_trait;
4use devboy_core::LivenessProbe;
5
6use crate::client::YouGileClient;
7
8#[async_trait]
9impl LivenessProbe for YouGileClient {
10    fn provider_name(&self) -> &str {
11        "yougile"
12    }
13}
14
15#[cfg(test)]
16mod tests {
17    use super::*;
18    use devboy_core::liveness::LivenessStatus;
19    use secrecy::SecretString;
20
21    #[tokio::test]
22    async fn provider_name_is_yougile_and_default_returns_not_implemented() {
23        let client = YouGileClient::new("board-1", SecretString::from("any".to_owned()));
24        assert_eq!(client.provider_name(), "yougile");
25        let result = client
26            .test(&SecretString::from("any".to_owned()))
27            .await
28            .unwrap();
29        assert_eq!(result.status, LivenessStatus::NotImplemented);
30    }
31}