test(redis): stabilize resolution and TLS checks

This commit is contained in:
Devin AI 2026-11-01 04:56:41 +00:00
parent e6861949a6
commit 48a6025a0b
4 changed files with 5 additions and 4 deletions

View file

@ -15,7 +15,6 @@ from pathlib import Path
from typing import Final
from urllib.parse import urlsplit
import redis
import redis.asyncio as async_redis
from litellm._redis import (
@ -334,7 +333,6 @@ def resolve(kwargs: Mapping[str, object], values: Mapping[str, str]) -> dict[str
def derive() -> dict[str, object]:
return {
"redis_py": redis.__version__,
"cases": [
{"name": name, "kwargs": kwargs, "environment": values, "python": resolve(kwargs, values)}
for name, kwargs, values in CASES

View file

@ -1046,6 +1046,5 @@
"tls": null
}
}
],
"redis_py": "5.3.1"
]
}

View file

@ -24,4 +24,5 @@ tokio = { workspace = true, features = ["sync", "time"] }
[dev-dependencies]
litellm-redis-testing.workspace = true
rustls.workspace = true
rstest.workspace = true

View file

@ -32,6 +32,9 @@ async fn ping_over_tls(
check_hostname: bool,
client_certificate: bool,
) -> Result<(), litellm_redis_client::Error> {
if rustls::crypto::CryptoProvider::get_default().is_none() {
let _ = rustls::crypto::ring::default_provider().install_default();
}
let server = litellm_redis_testing::RedisTlsServer::start(require_client_certificate)
.await
.unwrap();