File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,29 @@ func TestAuth(t *testing.T) {
25
25
User : "user_not_found" ,
26
26
Password : "qwerty" ,
27
27
})
28
+ ver , _ := tntBoxVersion (box )
29
+
28
30
if assert .Error (err ) && assert .Nil (conn ) {
29
- assert .Contains (err .Error (), "is not found" )
31
+ if ver >= version2_11_0 {
32
+ assert .Exactly (err .Error (), "User not found or supplied credentials are invalid" )
33
+ } else {
34
+ assert .Contains (err .Error (), "is not found" )
35
+ }
30
36
}
31
37
32
38
// bad password
33
39
conn , err = box .Connect (& Options {
34
40
User : "tester" ,
35
41
Password : "qwerty" ,
36
42
})
43
+ ver , _ = tntBoxVersion (box )
44
+
37
45
if assert .Error (err ) && assert .Nil (conn ) {
38
- assert .Contains (err .Error (), "Incorrect password supplied for user" )
46
+ if ver >= version2_11_0 {
47
+ assert .Exactly (err .Error (), "User not found or supplied credentials are invalid" )
48
+ } else {
49
+ assert .Contains (err .Error (), "Incorrect password supplied for user" )
50
+ }
39
51
}
40
52
41
53
// ok user password
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ const (
136
136
ErrDropUser = uint (0x2c ) // Failed to drop user '%s': %s
137
137
ErrNoSuchUser = uint (0x2d ) // User '%s' is not found
138
138
ErrUserExists = uint (0x2e ) // User '%s' already exists
139
- ErrPasswordMismatch = uint (0x2f ) // Incorrect password supplied for user '%s'
139
+ ErrCredsMismatch = uint (0x2f ) // User not found or supplied credentials are invalid
140
140
ErrUnknownRequestType = uint (0x30 ) // Unknown request type %u
141
141
ErrUnknownSchemaObject = uint (0x31 ) // Unknown object type '%s'
142
142
ErrCreateFunction = uint (0x32 ) // Failed to create function '%s': %s
You can’t perform that action at this time.
0 commit comments