@@ -38,6 +38,7 @@ def test_secrets_manager_fips_endpoint(self, mock_boto3_client):
3838 mock_boto3_client .assert_called_with (
3939 "secretsmanager" ,
4040 endpoint_url = "https://secretsmanager-fips.us-gov-east-1.amazonaws.com" ,
41+ region_name = "us-gov-east-1" ,
4142 )
4243 self .assertEqual (api_key , "test-api-key" )
4344
@@ -56,7 +57,8 @@ def test_secrets_manager_different_region(self, mock_boto3_client):
5657
5758 mock_boto3_client .assert_called_with (
5859 "secretsmanager" ,
59- endpoint_url = "https://secretsmanager.us-west-1.amazonaws.com" ,
60+ endpoint_url = None ,
61+ region_name = "us-west-1" ,
6062 )
6163 self .assertEqual (api_key , "test-api-key" )
6264
@@ -103,8 +105,12 @@ def test_no_fips_for_standard_regions(self, mock_boto3_client):
103105
104106 os .environ .clear ()
105107 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"
107111
108112 api .get_api_key ()
109113
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