From 17dafa30c4a7e7ff286b7951547a47f14f77d0d4 Mon Sep 17 00:00:00 2001 From: wayblink Date: Fri, 10 May 2024 17:11:18 +0800 Subject: [PATCH] fix mock --- internal/indexnode/indexnode_mock.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/indexnode/indexnode_mock.go b/internal/indexnode/indexnode_mock.go index fc1b9249ccea2..e56f6517cb0c8 100644 --- a/internal/indexnode/indexnode_mock.go +++ b/internal/indexnode/indexnode_mock.go @@ -52,6 +52,7 @@ type Mock struct { CallQueryJobs func(ctx context.Context, in *indexpb.QueryJobsRequest) (*indexpb.QueryJobsResponse, error) CallDropJobs func(ctx context.Context, in *indexpb.DropJobsRequest) (*commonpb.Status, error) CallGetJobStats func(ctx context.Context, in *indexpb.GetJobStatsRequest) (*indexpb.GetJobStatsResponse, error) + CallCreateJobV2 func(ctx context.Context, req *indexpb.CreateJobV2Request) (*commonpb.Status, error) CallGetMetrics func(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) CallShowConfigurations func(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) @@ -96,6 +97,9 @@ func NewIndexNodeMock() *Mock { CallCreateJob: func(ctx context.Context, req *indexpb.CreateJobRequest) (*commonpb.Status, error) { return merr.Success(), nil }, + CallCreateJobV2: func(ctx context.Context, req *indexpb.CreateJobV2Request) (*commonpb.Status, error) { + return merr.Success(), nil + }, CallQueryJobs: func(ctx context.Context, in *indexpb.QueryJobsRequest) (*indexpb.QueryJobsResponse, error) { indexInfos := make([]*indexpb.IndexTaskInfo, 0) for _, buildID := range in.BuildIDs { @@ -201,6 +205,10 @@ func (m *Mock) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) return m.CallGetMetrics(ctx, req) } +func (m *Mock) CreateJobV2(ctx context.Context, req *indexpb.CreateJobV2Request) (*commonpb.Status, error) { + return m.CallCreateJobV2(ctx, req) +} + // ShowConfigurations returns the configurations of Mock indexNode matching req.Pattern func (m *Mock) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) { return m.CallShowConfigurations(ctx, req)