@@ -679,12 +679,12 @@ func TestClientSideEncryptionProse(t *testing.T) {
679
679
"tenantId" : azureTenantID ,
680
680
"clientId" : azureClientID ,
681
681
"clientSecret" : azureClientSecret ,
682
- "identityPlatformEndpoint" : "example.com :443" ,
682
+ "identityPlatformEndpoint" : "doesnotexist.invalid :443" ,
683
683
},
684
684
"gcp" : {
685
685
"email" : gcpEmail ,
686
686
"privateKey" : gcpPrivateKey ,
687
- "endpoint" : "example.com :443" ,
687
+ "endpoint" : "doesnotexist.invalid :443" ,
688
688
},
689
689
"kmip" : {
690
690
"endpoint" : "doesnotexist.local:5698" ,
@@ -723,7 +723,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
723
723
awsFailureParseError := map [string ]interface {}{
724
724
"region" : "us-east-1" ,
725
725
"key" : "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0" ,
726
- "endpoint" : "example.com " ,
726
+ "endpoint" : "doesnotexist.invalid " ,
727
727
}
728
728
azure := map [string ]interface {}{
729
729
"keyVaultEndpoint" : "key-vault-csfle.vault.azure.net" ,
@@ -741,7 +741,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
741
741
"location" : "global" ,
742
742
"keyRing" : "key-ring-csfle" ,
743
743
"keyName" : "key-name-csfle" ,
744
- "endpoint" : "example.com :443" ,
744
+ "endpoint" : "doesnotexist.invalid :443" ,
745
745
}
746
746
kmipSuccessWithoutEndpoint := map [string ]interface {}{
747
747
"keyId" : "1" ,
@@ -763,18 +763,18 @@ func TestClientSideEncryptionProse(t *testing.T) {
763
763
testInvalidClientEncryption bool
764
764
invalidClientEncryptionErrorSubstring string
765
765
}{
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 , "" },
778
778
}
779
779
for _ , tc := range testCases {
780
780
mt .Run (tc .name , func (mt * mtest.T ) {
0 commit comments