mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
test(redis): cover AWS IAM provider install on async cluster nodes
No existing test combined aws_iam_auth with startup_nodes, the shape ElastiCache/Valkey Serverless deployments actually use.
This commit is contained in:
parent
1273e46b8b
commit
604b9edc53
1 changed files with 14 additions and 0 deletions
|
|
@ -488,6 +488,20 @@ def test_azure_wins_over_aws_iam(clean_redis_environment):
|
|||
assert redis_kwargs["redis_connect_func"] is mock_azure.return_value
|
||||
|
||||
|
||||
def test_async_cluster_installs_aws_iam_provider(clean_redis_environment):
|
||||
startup_nodes = [{"host": "cluster-node", "port": 6379}]
|
||||
|
||||
client = get_redis_async_client(
|
||||
startup_nodes=startup_nodes,
|
||||
aws_iam_auth=True,
|
||||
aws_iam_user_name="iam-user",
|
||||
aws_iam_cache_name="cache.example.com",
|
||||
aws_iam_region="us-east-1",
|
||||
)
|
||||
|
||||
assert isinstance(client.connection_kwargs["credential_provider"], ElastiCacheIAMCredentialProvider)
|
||||
|
||||
|
||||
def test_provider_keeps_the_rest_of_the_url_intact(clean_redis_environment):
|
||||
provider = _StubCredentialProvider()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue