Skip to content

Commit 2fe8041

Browse files
dfanglmfurqaan31
authored andcommitted
OpenSearch: Disable SSL validation for unsupported regions (localstack#13346)
1 parent dc1db09 commit 2fe8041

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/aws/services/opensearch/test_opensearch.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ def try_cluster_health(cluster_url: str):
9999
], "expected cluster state to be in a valid state"
100100

101101

102+
@pytest.fixture(autouse=True)
103+
def disable_ssl_validation_for_unsupported_regions(region_name, monkeypatch):
104+
# list of regions supported in our certificate
105+
# prevents SSL verification for regional hostnames not present in the SAN list of the certificate
106+
if region_name not in {
107+
"eu-central-1",
108+
"eu-west-1",
109+
"us-east-1",
110+
"us-east-2",
111+
"us-west-1",
112+
"us-west-2",
113+
}:
114+
monkeypatch.setattr(requests, "verify_ssl", False)
115+
116+
102117
@markers.skip_offline
103118
class TestOpensearchProvider:
104119
"""

0 commit comments

Comments
 (0)