@@ -6,14 +6,15 @@ import (
6
6
"strings"
7
7
"testing"
8
8
9
- "github.com/juju/errors"
10
9
. "github.com/pingcap/check"
10
+ "github.com/pingcap/errors"
11
11
"github.com/siddontang/go-mysql/test_util/test_keys"
12
12
13
13
"github.com/siddontang/go-mysql/mysql"
14
14
)
15
15
16
16
var testHost = flag .String ("host" , "127.0.0.1" , "MySQL server host" )
17
+
17
18
// We cover the whole range of MySQL server versions using docker-compose to bind them to different ports for testing.
18
19
// MySQL is constantly updating auth plugin to make it secure:
19
20
// starting from MySQL 8.0.4, a new auth plugin is introduced, causing plain password auth to fail with error:
@@ -134,9 +135,9 @@ func (s *clientTestSuite) TestConn_TLS_Certificate(c *C) {
134
135
if err == nil {
135
136
c .Fatal ("expected error" )
136
137
}
137
- if ! strings .Contains (errors .Details (err ), "certificate is not valid for any names" ) &&
138
- ! strings .Contains (errors .Details (err ), "certificate is valid for" ) {
139
- c .Fatalf ("expected errors for server name verification, but got unknown error: %s" , errors .Details (err ))
138
+ if ! strings .Contains (errors .ErrorStack (err ), "certificate is not valid for any names" ) &&
139
+ ! strings .Contains (errors .ErrorStack (err ), "certificate is valid for" ) {
140
+ c .Fatalf ("expected errors for server name verification, but got unknown error: %s" , errors .ErrorStack (err ))
140
141
}
141
142
}
142
143
@@ -394,4 +395,4 @@ func (s *clientTestSuite) TestStmt_Trans(c *C) {
394
395
395
396
str , _ = r .GetString (0 , 0 )
396
397
c .Assert (str , Equals , `abc` )
397
- }
398
+ }
0 commit comments