Skip to content

Commit 7d50ea3

Browse files
kevinAlbsBenjamin Rewis
authored andcommitted
GODRIVER-2300 remove example.com from CSFLE tests (#848)
* GODRIVER-2274 add numbers to CSFLE Custom Endpoint prose tests * GODRIVER-2300 remove example.com from CSFLE tests
1 parent 4ccc008 commit 7d50ea3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

mongo/integration/client_side_encryption_prose_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,12 @@ func TestClientSideEncryptionProse(t *testing.T) {
679679
"tenantId": azureTenantID,
680680
"clientId": azureClientID,
681681
"clientSecret": azureClientSecret,
682-
"identityPlatformEndpoint": "example.com:443",
682+
"identityPlatformEndpoint": "doesnotexist.invalid:443",
683683
},
684684
"gcp": {
685685
"email": gcpEmail,
686686
"privateKey": gcpPrivateKey,
687-
"endpoint": "example.com:443",
687+
"endpoint": "doesnotexist.invalid:443",
688688
},
689689
"kmip": {
690690
"endpoint": "doesnotexist.local:5698",
@@ -723,7 +723,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
723723
awsFailureParseError := map[string]interface{}{
724724
"region": "us-east-1",
725725
"key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
726-
"endpoint": "example.com",
726+
"endpoint": "doesnotexist.invalid",
727727
}
728728
azure := map[string]interface{}{
729729
"keyVaultEndpoint": "key-vault-csfle.vault.azure.net",
@@ -741,7 +741,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
741741
"location": "global",
742742
"keyRing": "key-ring-csfle",
743743
"keyName": "key-name-csfle",
744-
"endpoint": "example.com:443",
744+
"endpoint": "doesnotexist.invalid:443",
745745
}
746746
kmipSuccessWithoutEndpoint := map[string]interface{}{
747747
"keyId": "1",
@@ -763,18 +763,18 @@ func TestClientSideEncryptionProse(t *testing.T) {
763763
testInvalidClientEncryption bool
764764
invalidClientEncryptionErrorSubstring string
765765
}{
766-
{"aws success without endpoint", "aws", awsSuccessWithoutEndpoint, "", false, ""},
767-
{"aws success with endpoint", "aws", awsSuccessWithEndpoint, "", false, ""},
768-
{"aws success with https endpoint", "aws", awsSuccessWithHTTPSEndpoint, "", false, ""},
769-
{"aws failure with connection error", "aws", awsFailureConnectionError, "connection refused", false, ""},
770-
{"aws failure with wrong endpoint", "aws", awsFailureInvalidEndpoint, "us-east-1", false, ""},
771-
{"aws failure with parse error", "aws", awsFailureParseError, "parse error", false, ""},
772-
{"azure success", "azure", azure, "", true, "parse error"},
773-
{"gcp success", "gcp", gcpSuccess, "", true, "parse error"},
774-
{"gcp failure", "gcp", gcpFailure, "Invalid KMS response", false, ""},
775-
{"kmip success without endpoint", "kmip", kmipSuccessWithoutEndpoint, "", true, "no such host"},
776-
{"kmip success with endpoint", "kmip", kmipSuccessWithEndpoint, "", false, ""},
777-
{"kmip failure with invalid endpoint", "kmip", kmipFailureInvalidEndpoint, "no such host", false, ""},
766+
{"Case 1: aws success without endpoint", "aws", awsSuccessWithoutEndpoint, "", false, ""},
767+
{"Case 2: aws success with endpoint", "aws", awsSuccessWithEndpoint, "", false, ""},
768+
{"Case 3: aws success with https endpoint", "aws", awsSuccessWithHTTPSEndpoint, "", false, ""},
769+
{"Case 4: aws failure with connection error", "aws", awsFailureConnectionError, "connection refused", false, ""},
770+
{"Case 5: aws failure with wrong endpoint", "aws", awsFailureInvalidEndpoint, "us-east-1", false, ""},
771+
{"Case 6: aws failure with parse error", "aws", awsFailureParseError, "no such host", false, ""},
772+
{"Case 7: azure success", "azure", azure, "", true, "no such host"},
773+
{"Case 8: gcp success", "gcp", gcpSuccess, "", true, "no such host"},
774+
{"Case 9: gcp failure", "gcp", gcpFailure, "Invalid KMS response", false, ""},
775+
{"Case 10: kmip success without endpoint", "kmip", kmipSuccessWithoutEndpoint, "", true, "no such host"},
776+
{"Case 11: kmip success with endpoint", "kmip", kmipSuccessWithEndpoint, "", false, ""},
777+
{"Case 12: kmip failure with invalid endpoint", "kmip", kmipFailureInvalidEndpoint, "no such host", false, ""},
778778
}
779779
for _, tc := range testCases {
780780
mt.Run(tc.name, func(mt *mtest.T) {

0 commit comments

Comments
 (0)