@@ -1628,8 +1628,16 @@ func TestClientSideEncryptionProse(t *testing.T) {
1628
1628
_ , err := cpt .clientEnc .CreateDataKey (context .Background (), tc .name , dkOpts )
1629
1629
1630
1630
assert .NotNil (mt , err , "expected error, got nil" )
1631
- assert .True (mt , strings .Contains (err .Error (), "certificate signed by unknown authority" ),
1632
- "expected error '%s' to contain '%s'" , err .Error (), "certificate signed by unknown authority" )
1631
+
1632
+ possibleErrors := []string {
1633
+ "x509: certificate signed by unknown authority" , // Windows
1634
+ "x509: “valid.testing.golang.invalid” certificate is not trusted" , // MacOS
1635
+ "x509: certificate is not authorized to sign other certificates" , // All others
1636
+ }
1637
+
1638
+ assert .True (t , containsSubstring (possibleErrors , err .Error ()),
1639
+ "expected possibleErrors=%v to contain %v, but it didn't" ,
1640
+ possibleErrors , err .Error ())
1633
1641
1634
1642
// call CreateDataKey with CEO & TLS with each provider and corresponding master key
1635
1643
cpt = setup (mt , nil , defaultKvClientOptions , validClientEncryptionOptionsWithTLS )
0 commit comments