Skip to content

Commit 211c852

Browse files
author
James Cor
committed
restore
1 parent 75fbf4d commit 211c852

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_example/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestExampleRootUserEnabled(t *testing.T) {
6565
}()
6666
conn, err := dbr.Open("mysql", fmt.Sprintf("no_user:@tcp(%s:%d)/%s", address, port, dbName), nil)
6767
require.NoError(t, err)
68-
require.ErrorContains(t, conn.Ping(), "No authentication methods available for authentication")
68+
require.ErrorContains(t, conn.Ping(), "User not found")
6969
conn, err = dbr.Open("mysql", fmt.Sprintf("root:@tcp(%s:%d)/%s", address, port, dbName), nil)
7070
require.NoError(t, err)
7171
require.NoError(t, conn.Ping())
@@ -86,10 +86,10 @@ func TestExampleLoadedUser(t *testing.T) {
8686
}()
8787
conn, err := dbr.Open("mysql", fmt.Sprintf("no_user:@tcp(%s:%d)/%s", address, port, dbName), nil)
8888
require.NoError(t, err)
89-
require.ErrorContains(t, conn.Ping(), "No authentication methods available for authentication")
89+
require.ErrorContains(t, conn.Ping(), "User not found")
9090
conn, err = dbr.Open("mysql", fmt.Sprintf("root:@tcp(%s:%d)/%s", address, port, dbName), nil)
9191
require.NoError(t, err)
92-
require.ErrorContains(t, conn.Ping(), "No authentication methods available for authentication")
92+
require.ErrorContains(t, conn.Ping(), "User not found")
9393
conn, err = dbr.Open("mysql",
9494
fmt.Sprintf("gms_user:123456@tcp(%s:%d)/%s?allowCleartextPasswords=true", address, port, dbName), nil)
9595
require.NoError(t, err)

0 commit comments

Comments
 (0)