#[cfg(test)]
mod tests {
use reqwest::Client;
#[test]
fn test_reqwest_client_default_has_tls_enabled() {
let _client = Client::new();
}
#[test]
fn test_openai_uses_https() {
let base_url = "https://api.openai.com/v1";
assert!(
base_url.starts_with("https://"),
"OpenAI config must use HTTPS"
);
}
#[test]
fn test_anthropic_uses_https() {
let base_url = "https://api.anthropic.com/v1";
assert!(
base_url.starts_with("https://"),
"Anthropic config must use HTTPS"
);
}
#[test]
fn test_deepseek_uses_https() {
let base_url = "https://api.deepseek.com/v1";
assert!(
base_url.starts_with("https://"),
"DeepSeek config must use HTTPS"
);
}
#[test]
fn test_no_insecure_http_in_llm_configs() {
let openai_url = "https://api.openai.com/v1";
let anthropic_url = "https://api.anthropic.com/v1";
let deepseek_url = "https://api.deepseek.com/v1";
assert!(
!openai_url.starts_with("http://"),
"OpenAI must not use insecure HTTP"
);
assert!(
!anthropic_url.starts_with("http://"),
"Anthropic must not use insecure HTTP"
);
assert!(
!deepseek_url.starts_with("http://"),
"DeepSeek must not use insecure HTTP"
);
}
}