@@ -38,6 +38,7 @@ def test_secrets_manager_fips_endpoint(self, mock_boto3_client):
38
38
mock_boto3_client .assert_called_with (
39
39
"secretsmanager" ,
40
40
endpoint_url = "https://secretsmanager-fips.us-gov-east-1.amazonaws.com" ,
41
+ region_name = "us-gov-east-1" ,
41
42
)
42
43
self .assertEqual (api_key , "test-api-key" )
43
44
@@ -56,7 +57,8 @@ def test_secrets_manager_different_region(self, mock_boto3_client):
56
57
57
58
mock_boto3_client .assert_called_with (
58
59
"secretsmanager" ,
59
- endpoint_url = "https://secretsmanager.us-west-1.amazonaws.com" ,
60
+ endpoint_url = None ,
61
+ region_name = "us-west-1" ,
60
62
)
61
63
self .assertEqual (api_key , "test-api-key" )
62
64
@@ -103,8 +105,12 @@ def test_no_fips_for_standard_regions(self, mock_boto3_client):
103
105
104
106
os .environ .clear ()
105
107
os .environ ["AWS_REGION" ] = "us-west-2"
106
- os .environ ["DD_API_KEY_SECRET_ARN" ] = "test-arn"
108
+ os .environ [
109
+ "DD_API_KEY_SECRET_ARN"
110
+ ] = "arn:aws:secretsmanager:us-west-2:1234567890:secret:key-name-123ABC"
107
111
108
112
api .get_api_key ()
109
113
110
- mock_boto3_client .assert_called_with ("secretsmanager" , endpoint_url = None )
114
+ mock_boto3_client .assert_called_with (
115
+ "secretsmanager" , endpoint_url = None , region_name = "us-west-2"
116
+ )
0 commit comments