diff --git a/server/mock_conn.go b/server/mock_conn.go index 6ccf90a1e519f..c6c6579618074 100644 --- a/server/mock_conn.go +++ b/server/mock_conn.go @@ -114,7 +114,8 @@ func CreateMockConn(t *testing.T, server *Server) MockConn { server.clients[cc.connectionID] = cc cc.server.rwlock.Unlock() tc.Session.SetSessionManager(server) - tc.Session.Auth(&auth.UserIdentity{Username: "root", Hostname: "localhost"}, nil, nil) + err = tc.Session.Auth(&auth.UserIdentity{Username: "root", Hostname: "localhost"}, nil, nil) + require.NoError(t, err) return &mockConn{ clientConn: cc, t: t,