From 5c7db5f7e5aebc5c5f45c195eb70bc4a52604d8a Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 22 Aug 2024 16:12:13 +0800 Subject: [PATCH] fix ut Signed-off-by: Wei Liu --- internal/rootcoord/root_coord_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/rootcoord/root_coord_test.go b/internal/rootcoord/root_coord_test.go index 11dce7e364370..689bfee948a5a 100644 --- a/internal/rootcoord/root_coord_test.go +++ b/internal/rootcoord/root_coord_test.go @@ -40,6 +40,7 @@ import ( mockrootcoord "github.com/milvus-io/milvus/internal/rootcoord/mocks" "github.com/milvus-io/milvus/internal/util/dependency" kvfactory "github.com/milvus-io/milvus/internal/util/dependency/kv" + "github.com/milvus-io/milvus/internal/util/proxyutil" "github.com/milvus-io/milvus/internal/util/sessionutil" "github.com/milvus-io/milvus/pkg/util" "github.com/milvus-io/milvus/pkg/util/etcd" @@ -1990,6 +1991,9 @@ func TestCore_BackupRBAC(t *testing.T) { func TestCore_RestoreRBAC(t *testing.T) { meta := mockrootcoord.NewIMetaTable(t) c := newTestCore(withHealthyCode(), withMeta(meta)) + mockProxyClientManager := proxyutil.NewMockProxyClientManager(t) + mockProxyClientManager.EXPECT().RefreshPolicyInfoCache(mock.Anything, mock.Anything).Return(nil) + c.proxyClientManager = mockProxyClientManager meta.EXPECT().RestoreRBAC(mock.Anything, mock.Anything, mock.Anything).Return(nil) resp, err := c.RestoreRBAC(context.Background(), &milvuspb.RestoreRBACMetaRequest{})