diff --git a/auth_test.go b/auth_test.go index 3851c0c..a51b5cd 100644 --- a/auth_test.go +++ b/auth_test.go @@ -25,8 +25,14 @@ func TestAuth(t *testing.T) { User: "user_not_found", Password: "qwerty", }) + ver, _ := tntBoxVersion(box) + if assert.Error(err) && assert.Nil(conn) { - assert.Contains(err.Error(), "is not found") + if ver >= version2_11_0 { + assert.Exactly(err.Error(), "User not found or supplied credentials are invalid") + } else { + assert.Contains(err.Error(), "is not found") + } } // bad password @@ -34,8 +40,14 @@ func TestAuth(t *testing.T) { User: "tester", Password: "qwerty", }) + ver, _ = tntBoxVersion(box) + if assert.Error(err) && assert.Nil(conn) { - assert.Contains(err.Error(), "Incorrect password supplied for user") + if ver >= version2_11_0 { + assert.Exactly(err.Error(), "User not found or supplied credentials are invalid") + } else { + assert.Contains(err.Error(), "Incorrect password supplied for user") + } } // ok user password diff --git a/const.go b/const.go index c72fd12..3ef7858 100644 --- a/const.go +++ b/const.go @@ -136,7 +136,7 @@ const ( ErrDropUser = uint(0x2c) // Failed to drop user '%s': %s ErrNoSuchUser = uint(0x2d) // User '%s' is not found ErrUserExists = uint(0x2e) // User '%s' already exists - ErrPasswordMismatch = uint(0x2f) // Incorrect password supplied for user '%s' + ErrCredsMismatch = uint(0x2f) // User not found or supplied credentials are invalid ErrUnknownRequestType = uint(0x30) // Unknown request type %u ErrUnknownSchemaObject = uint(0x31) // Unknown object type '%s' ErrCreateFunction = uint(0x32) // Failed to create function '%s': %s