@@ -1306,7 +1306,7 @@ async def asyncSetUp(self):
1306
1306
kms_providers_invalid = copy .deepcopy (kms_providers )
1307
1307
kms_providers_invalid ["azure" ]["identityPlatformEndpoint" ] = "doesnotexist.invalid:443"
1308
1308
kms_providers_invalid ["gcp" ]["endpoint" ] = "doesnotexist.invalid:443"
1309
- kms_providers_invalid ["kmip" ]["endpoint" ] = "doesnotexist.local :5698"
1309
+ kms_providers_invalid ["kmip" ]["endpoint" ] = "doesnotexist.invalid :5698"
1310
1310
self .client_encryption_invalid = self .create_client_encryption (
1311
1311
kms_providers = kms_providers_invalid ,
1312
1312
key_vault_namespace = "keyvault.datakeys" ,
@@ -1364,15 +1364,10 @@ async def test_03_aws_region_key_endpoint_port(self):
1364
1364
},
1365
1365
)
1366
1366
1367
- @unittest .skipUnless (any (AWS_CREDS .values ()), "AWS environment credentials are not set" )
1368
- async def test_04_aws_endpoint_invalid_port (self ):
1369
- master_key = {
1370
- "region" : "us-east-1" ,
1371
- "key" : ("arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0" ),
1372
- "endpoint" : "kms.us-east-1.amazonaws.com:12345" ,
1373
- }
1374
- with self .assertRaisesRegex (EncryptionError , "kms.us-east-1.amazonaws.com:12345" ):
1375
- await self .client_encryption .create_data_key ("aws" , master_key = master_key )
1367
+ async def test_04_kmip_endpoint_invalid_port (self ):
1368
+ master_key = {"keyId" : "1" , "endpoint" : "localhost:12345" }
1369
+ with self .assertRaisesRegex (EncryptionError , "localhost:12345" ):
1370
+ await self .client_encryption .create_data_key ("kmip" , master_key = master_key )
1376
1371
1377
1372
@unittest .skipUnless (any (AWS_CREDS .values ()), "AWS environment credentials are not set" )
1378
1373
async def test_05_aws_endpoint_wrong_region (self ):
@@ -1478,7 +1473,7 @@ async def test_11_kmip_master_key_endpoint(self):
1478
1473
self .assertEqual ("test" , await self .client_encryption_invalid .decrypt (encrypted ))
1479
1474
1480
1475
async def test_12_kmip_master_key_invalid_endpoint (self ):
1481
- key = {"keyId" : "1" , "endpoint" : "doesnotexist.local :5698" }
1476
+ key = {"keyId" : "1" , "endpoint" : "doesnotexist.invalid :5698" }
1482
1477
with self .assertRaisesRegex (EncryptionError , self .kmip_host_error ):
1483
1478
await self .client_encryption .create_data_key ("kmip" , key )
1484
1479
@@ -2166,7 +2161,7 @@ async def test_01_aws(self):
2166
2161
await self .client_encryption_invalid_hostname .create_data_key ("aws" , key )
2167
2162
2168
2163
async def test_02_azure (self ):
2169
- key = {"keyVaultEndpoint" : "doesnotexist.local " , "keyName" : "foo" }
2164
+ key = {"keyVaultEndpoint" : "doesnotexist.invalid " , "keyName" : "foo" }
2170
2165
# Missing client cert error.
2171
2166
with self .assertRaisesRegex (EncryptionError , self .cert_error ):
2172
2167
await self .client_encryption_no_client_cert .create_data_key ("azure" , key )
@@ -2241,7 +2236,7 @@ async def test_06_named_kms_providers_apply_tls_options_aws(self):
2241
2236
await self .client_encryption_with_names .create_data_key ("aws:with_tls" , key )
2242
2237
2243
2238
async def test_06_named_kms_providers_apply_tls_options_azure (self ):
2244
- key = {"keyVaultEndpoint" : "doesnotexist.local " , "keyName" : "foo" }
2239
+ key = {"keyVaultEndpoint" : "doesnotexist.invalid " , "keyName" : "foo" }
2245
2240
# Missing client cert error.
2246
2241
with self .assertRaisesRegex (EncryptionError , self .cert_error ):
2247
2242
await self .client_encryption_with_names .create_data_key ("azure:no_client_cert" , key )
0 commit comments