Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GODRIVER-2300 remove example.com from CSFLE tests #848

Merged
merged 2 commits into from Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions mongo/integration/client_side_encryption_prose_test.go
Expand Up @@ -679,12 +679,12 @@ func TestClientSideEncryptionProse(t *testing.T) {
"tenantId": azureTenantID,
"clientId": azureClientID,
"clientSecret": azureClientSecret,
"identityPlatformEndpoint": "example.com:443",
"identityPlatformEndpoint": "doesnotexist.invalid:443",
},
"gcp": {
"email": gcpEmail,
"privateKey": gcpPrivateKey,
"endpoint": "example.com:443",
"endpoint": "doesnotexist.invalid:443",
},
"kmip": {
"endpoint": "doesnotexist.local:5698",
Expand Down Expand Up @@ -723,7 +723,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
awsFailureParseError := map[string]interface{}{
"region": "us-east-1",
"key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
"endpoint": "example.com",
"endpoint": "doesnotexist.invalid",
}
azure := map[string]interface{}{
"keyVaultEndpoint": "key-vault-csfle.vault.azure.net",
Expand All @@ -741,7 +741,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
"location": "global",
"keyRing": "key-ring-csfle",
"keyName": "key-name-csfle",
"endpoint": "example.com:443",
"endpoint": "doesnotexist.invalid:443",
}
kmipSuccessWithoutEndpoint := map[string]interface{}{
"keyId": "1",
Expand All @@ -763,18 +763,18 @@ func TestClientSideEncryptionProse(t *testing.T) {
testInvalidClientEncryption bool
invalidClientEncryptionErrorSubstring string
}{
{"aws success without endpoint", "aws", awsSuccessWithoutEndpoint, "", false, ""},
{"aws success with endpoint", "aws", awsSuccessWithEndpoint, "", false, ""},
{"aws success with https endpoint", "aws", awsSuccessWithHTTPSEndpoint, "", false, ""},
{"aws failure with connection error", "aws", awsFailureConnectionError, "connection refused", false, ""},
{"aws failure with wrong endpoint", "aws", awsFailureInvalidEndpoint, "us-east-1", false, ""},
{"aws failure with parse error", "aws", awsFailureParseError, "parse error", false, ""},
{"azure success", "azure", azure, "", true, "parse error"},
{"gcp success", "gcp", gcpSuccess, "", true, "parse error"},
{"gcp failure", "gcp", gcpFailure, "Invalid KMS response", false, ""},
{"kmip success without endpoint", "kmip", kmipSuccessWithoutEndpoint, "", true, "no such host"},
{"kmip success with endpoint", "kmip", kmipSuccessWithEndpoint, "", false, ""},
{"kmip failure with invalid endpoint", "kmip", kmipFailureInvalidEndpoint, "no such host", false, ""},
{"Case 1: aws success without endpoint", "aws", awsSuccessWithoutEndpoint, "", false, ""},
{"Case 2: aws success with endpoint", "aws", awsSuccessWithEndpoint, "", false, ""},
{"Case 3: aws success with https endpoint", "aws", awsSuccessWithHTTPSEndpoint, "", false, ""},
{"Case 4: aws failure with connection error", "aws", awsFailureConnectionError, "connection refused", false, ""},
{"Case 5: aws failure with wrong endpoint", "aws", awsFailureInvalidEndpoint, "us-east-1", false, ""},
{"Case 6: aws failure with parse error", "aws", awsFailureParseError, "no such host", false, ""},
{"Case 7: azure success", "azure", azure, "", true, "no such host"},
{"Case 8: gcp success", "gcp", gcpSuccess, "", true, "no such host"},
{"Case 9: gcp failure", "gcp", gcpFailure, "Invalid KMS response", false, ""},
{"Case 10: kmip success without endpoint", "kmip", kmipSuccessWithoutEndpoint, "", true, "no such host"},
{"Case 11: kmip success with endpoint", "kmip", kmipSuccessWithEndpoint, "", false, ""},
{"Case 12: kmip failure with invalid endpoint", "kmip", kmipFailureInvalidEndpoint, "no such host", false, ""},
}
for _, tc := range testCases {
mt.Run(tc.name, func(mt *mtest.T) {
Expand Down