mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-01 07:03:02 +00:00
test(redis): stabilize resolution and TLS checks
This commit is contained in:
parent
e6861949a6
commit
48a6025a0b
4 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1046,6 +1046,5 @@
|
|||
"tls": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"redis_py": "5.3.1"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,5 @@ tokio = { workspace = true, features = ["sync", "time"] }
|
|||
|
||||
[dev-dependencies]
|
||||
litellm-redis-testing.workspace = true
|
||||
rustls.workspace = true
|
||||
rstest.workspace = true
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue