Skip to content

Commit

Permalink
feat: generate protoc
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed May 17, 2022
1 parent 99bc7cf commit a86913d
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 314 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compatibility-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
KIND_VERSION: v0.11.1
CONTAINERD_VERSION: v1.5.2
KIND_CONFIG_PATH: test/testdata/kind/config.yaml
DRAGONFLY_STABLE_IMAGE_TAG: v2.0.3-beta.2
DRAGONFLY_STABLE_IMAGE_TAG: v2.0.3-beta.3
DRAGONFLY_CHARTS_PATH: deploy/helm-charts/charts/dragonfly
DRAGONFLY_CHARTS_CONFIG_PATH: test/testdata/charts/config.yaml
DRAGONFLY_FILE_SERVER_PATH: test/testdata/k8s/file-server.yaml
Expand Down
5 changes: 3 additions & 2 deletions client/daemon/peer/peertask_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func setupPeerTaskManagerComponents(ctrl *gomock.Controller, opt componentsOptio
StealPeers: nil,
}, nil
})
pps.EXPECT().CloseSend().AnyTimes()

sched := mock_scheduler_client.NewMockClient(ctrl)
sched.EXPECT().RegisterPeerTask(gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
Expand Down Expand Up @@ -252,8 +253,8 @@ func setupPeerTaskManagerComponents(ctrl *gomock.Controller, opt componentsOptio
DirectPiece: nil,
}, nil
})
sched.EXPECT().ReportPieceResult(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
func(ctx context.Context, taskId string, ptr *scheduler.PeerTaskRequest, opts ...grpc.CallOption) (
sched.EXPECT().ReportPieceResult(gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
func(ctx context.Context, ptr *scheduler.PeerTaskRequest, opts ...grpc.CallOption) (
scheduler.Scheduler_ReportPieceResultClient, error) {
return pps, nil
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func setupBackSourcePartialComponents(ctrl *gomock.Controller, testBytes []byte,
StealPeers: nil,
}, nil
})
pps.EXPECT().CloseSend().AnyTimes()
sched := mock_scheduler_client.NewMockClient(ctrl)
sched.EXPECT().RegisterPeerTask(gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
func(ctx context.Context, ptr *scheduler.PeerTaskRequest, opts ...grpc.CallOption) (*scheduler.RegisterResult, error) {
Expand All @@ -170,7 +171,7 @@ func setupBackSourcePartialComponents(ctrl *gomock.Controller, testBytes []byte,
}, nil
})
sched.EXPECT().ReportPieceResult(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
func(ctx context.Context, taskId string, ptr *scheduler.PeerTaskRequest, opts ...grpc.CallOption) (scheduler.Scheduler_ReportPieceResultClient, error) {
func(ctx context.Context, ptr *scheduler.PeerTaskRequest, opts ...grpc.CallOption) (scheduler.Scheduler_ReportPieceResultClient, error) {
return pps, nil
})
sched.EXPECT().ReportPeerResult(gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(
Expand Down
157 changes: 0 additions & 157 deletions client/daemon/test/mock/scheduler/scheduler_client.go

This file was deleted.

This file was deleted.

Loading

0 comments on commit a86913d

Please sign in to comment.