test: isolate bedrock aws tests from ambient SSL env vars

Nine cases assert the sts client is built with verify=True, but get_ssl_verify
reads SSL_CERT_FILE and SSL_VERIFY, so the argument depended on the ambient
environment. The published images set SSL_CERT_FILE, so the suite failed there
while passing in CI.

Fixes #40357
This commit is contained in:
Animesh Kumar 2026-09-09 23:24:12 +05:30
parent 1183b2abc6
commit 6195fbf5f3

View file

@ -38,6 +38,14 @@ def flush_shared_bedrock_iam_cache():
yield
@pytest.fixture(autouse=True)
def _clean_ssl_env(monkeypatch):
"""get_ssl_verify reads these, so the sts client's verify= would otherwise depend on
the ambient environment. The published images set SSL_CERT_FILE."""
for env_var in ("SSL_CERT_FILE", "SSL_VERIFY"):
monkeypatch.delenv(env_var, raising=False)
def test_base_aws_llm_instances_share_process_wide_iam_cache():
"""Regression LIT-2662: new instances must reuse iam_cache (Bedrock passthrough is per-request)."""
first = BaseAWSLLM()