test(redis): select TLS provider in connect test

This commit is contained in:
Devin AI 2026-11-01 05:45:19 +00:00
parent 4c7529b834
commit 5e7a28a75c
3 changed files with 5 additions and 0 deletions

View file

@ -4433,6 +4433,7 @@ dependencies = [
"litellm-redis-client",
"litellm-redis-testing",
"rstest",
"rustls 0.23.42",
"serde_json",
"thiserror 2.0.19",
"tokio",

View file

@ -14,6 +14,7 @@ tracing.workspace = true
[dev-dependencies]
litellm-redis-testing.workspace = true
rustls.workspace = true
serde_json.workspace = true
rstest.workspace = true
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

View file

@ -26,6 +26,9 @@ fn port(url: &str) -> u16 {
#[case::system_roots_only(false, false)]
#[tokio::test]
async fn python_tls_kwargs_reach_the_server(#[case] with_ca: bool, #[case] connects: bool) {
if rustls::crypto::CryptoProvider::get_default().is_none() {
let _ = rustls::crypto::ring::default_provider().install_default();
}
let server = RedisTlsServer::start(false).await.unwrap();
let kwargs = serde_json::json!({
"host": server.host(),