From b46662355facb76bf30f9e84916f3b70325878e1 Mon Sep 17 00:00:00 2001 From: wjhuang2016 Date: Fri, 26 Aug 2022 14:51:19 +0800 Subject: [PATCH] fix Signed-off-by: wjhuang2016 --- server/mock_conn.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,