diff --git a/internal/tool/testing/mock_gitaly/BUILD.bazel b/internal/tool/testing/mock_gitaly/BUILD.bazel deleted file mode 100644 index 7aba07b1..00000000 --- a/internal/tool/testing/mock_gitaly/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "mock_gitaly", - testonly = True, - srcs = [ - "doc.go", - "gitaly.go", - ], - importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/testing/mock_gitaly", - visibility = ["//:__subpackages__"], - deps = [ - "//internal/gitaly/vendored/gitalypb", - "@org_golang_google_grpc//:grpc", - "@org_golang_google_grpc//metadata", - "@org_uber_go_mock//gomock", - ], -) diff --git a/internal/tool/testing/mock_gitaly/doc.go b/internal/tool/testing/mock_gitaly/doc.go deleted file mode 100644 index dfb71614..00000000 --- a/internal/tool/testing/mock_gitaly/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Mocks for Gitaly. -package mock_gitaly - -//go:generate mockgen.sh -destination "gitaly.go" -package "mock_gitaly" "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitaly/vendored/gitalypb" "CommitServiceClient,CommitService_TreeEntryClient,SmartHTTPServiceClient,SmartHTTPService_InfoRefsUploadPackClient,CommitService_GetTreeEntriesClient" diff --git a/internal/tool/testing/mock_gitaly/gitaly.go b/internal/tool/testing/mock_gitaly/gitaly.go deleted file mode 100644 index 3b2351f7..00000000 --- a/internal/tool/testing/mock_gitaly/gitaly.go +++ /dev/null @@ -1,2126 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitaly/vendored/gitalypb (interfaces: CommitServiceClient,CommitService_TreeEntryClient,SmartHTTPServiceClient,SmartHTTPService_InfoRefsUploadPackClient,CommitService_GetTreeEntriesClient) -// -// Generated by this command: -// -// mockgen -typed -destination gitaly.go -package mock_gitaly gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitaly/vendored/gitalypb CommitServiceClient,CommitService_TreeEntryClient,SmartHTTPServiceClient,SmartHTTPService_InfoRefsUploadPackClient,CommitService_GetTreeEntriesClient -// -// Package mock_gitaly is a generated GoMock package. -package mock_gitaly - -import ( - context "context" - reflect "reflect" - - gitalypb "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitaly/vendored/gitalypb" - gomock "go.uber.org/mock/gomock" - grpc "google.golang.org/grpc" - metadata "google.golang.org/grpc/metadata" -) - -// MockCommitServiceClient is a mock of CommitServiceClient interface. -type MockCommitServiceClient struct { - ctrl *gomock.Controller - recorder *MockCommitServiceClientMockRecorder -} - -// MockCommitServiceClientMockRecorder is the mock recorder for MockCommitServiceClient. -type MockCommitServiceClientMockRecorder struct { - mock *MockCommitServiceClient -} - -// NewMockCommitServiceClient creates a new mock instance. -func NewMockCommitServiceClient(ctrl *gomock.Controller) *MockCommitServiceClient { - mock := &MockCommitServiceClient{ctrl: ctrl} - mock.recorder = &MockCommitServiceClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCommitServiceClient) EXPECT() *MockCommitServiceClientMockRecorder { - return m.recorder -} - -// CheckObjectsExist mocks base method. -func (m *MockCommitServiceClient) CheckObjectsExist(arg0 context.Context, arg1 ...grpc.CallOption) (gitalypb.CommitService_CheckObjectsExistClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CheckObjectsExist", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_CheckObjectsExistClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CheckObjectsExist indicates an expected call of CheckObjectsExist. -func (mr *MockCommitServiceClientMockRecorder) CheckObjectsExist(arg0 any, arg1 ...any) *CommitServiceClientCheckObjectsExistCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckObjectsExist", reflect.TypeOf((*MockCommitServiceClient)(nil).CheckObjectsExist), varargs...) - return &CommitServiceClientCheckObjectsExistCall{Call: call} -} - -// CommitServiceClientCheckObjectsExistCall wrap *gomock.Call -type CommitServiceClientCheckObjectsExistCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCheckObjectsExistCall) Return(arg0 gitalypb.CommitService_CheckObjectsExistClient, arg1 error) *CommitServiceClientCheckObjectsExistCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCheckObjectsExistCall) Do(f func(context.Context, ...grpc.CallOption) (gitalypb.CommitService_CheckObjectsExistClient, error)) *CommitServiceClientCheckObjectsExistCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCheckObjectsExistCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (gitalypb.CommitService_CheckObjectsExistClient, error)) *CommitServiceClientCheckObjectsExistCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CommitIsAncestor mocks base method. -func (m *MockCommitServiceClient) CommitIsAncestor(arg0 context.Context, arg1 *gitalypb.CommitIsAncestorRequest, arg2 ...grpc.CallOption) (*gitalypb.CommitIsAncestorResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CommitIsAncestor", varargs...) - ret0, _ := ret[0].(*gitalypb.CommitIsAncestorResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CommitIsAncestor indicates an expected call of CommitIsAncestor. -func (mr *MockCommitServiceClientMockRecorder) CommitIsAncestor(arg0, arg1 any, arg2 ...any) *CommitServiceClientCommitIsAncestorCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitIsAncestor", reflect.TypeOf((*MockCommitServiceClient)(nil).CommitIsAncestor), varargs...) - return &CommitServiceClientCommitIsAncestorCall{Call: call} -} - -// CommitServiceClientCommitIsAncestorCall wrap *gomock.Call -type CommitServiceClientCommitIsAncestorCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCommitIsAncestorCall) Return(arg0 *gitalypb.CommitIsAncestorResponse, arg1 error) *CommitServiceClientCommitIsAncestorCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCommitIsAncestorCall) Do(f func(context.Context, *gitalypb.CommitIsAncestorRequest, ...grpc.CallOption) (*gitalypb.CommitIsAncestorResponse, error)) *CommitServiceClientCommitIsAncestorCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCommitIsAncestorCall) DoAndReturn(f func(context.Context, *gitalypb.CommitIsAncestorRequest, ...grpc.CallOption) (*gitalypb.CommitIsAncestorResponse, error)) *CommitServiceClientCommitIsAncestorCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CommitLanguages mocks base method. -func (m *MockCommitServiceClient) CommitLanguages(arg0 context.Context, arg1 *gitalypb.CommitLanguagesRequest, arg2 ...grpc.CallOption) (*gitalypb.CommitLanguagesResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CommitLanguages", varargs...) - ret0, _ := ret[0].(*gitalypb.CommitLanguagesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CommitLanguages indicates an expected call of CommitLanguages. -func (mr *MockCommitServiceClientMockRecorder) CommitLanguages(arg0, arg1 any, arg2 ...any) *CommitServiceClientCommitLanguagesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitLanguages", reflect.TypeOf((*MockCommitServiceClient)(nil).CommitLanguages), varargs...) - return &CommitServiceClientCommitLanguagesCall{Call: call} -} - -// CommitServiceClientCommitLanguagesCall wrap *gomock.Call -type CommitServiceClientCommitLanguagesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCommitLanguagesCall) Return(arg0 *gitalypb.CommitLanguagesResponse, arg1 error) *CommitServiceClientCommitLanguagesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCommitLanguagesCall) Do(f func(context.Context, *gitalypb.CommitLanguagesRequest, ...grpc.CallOption) (*gitalypb.CommitLanguagesResponse, error)) *CommitServiceClientCommitLanguagesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCommitLanguagesCall) DoAndReturn(f func(context.Context, *gitalypb.CommitLanguagesRequest, ...grpc.CallOption) (*gitalypb.CommitLanguagesResponse, error)) *CommitServiceClientCommitLanguagesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CommitStats mocks base method. -func (m *MockCommitServiceClient) CommitStats(arg0 context.Context, arg1 *gitalypb.CommitStatsRequest, arg2 ...grpc.CallOption) (*gitalypb.CommitStatsResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CommitStats", varargs...) - ret0, _ := ret[0].(*gitalypb.CommitStatsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CommitStats indicates an expected call of CommitStats. -func (mr *MockCommitServiceClientMockRecorder) CommitStats(arg0, arg1 any, arg2 ...any) *CommitServiceClientCommitStatsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitStats", reflect.TypeOf((*MockCommitServiceClient)(nil).CommitStats), varargs...) - return &CommitServiceClientCommitStatsCall{Call: call} -} - -// CommitServiceClientCommitStatsCall wrap *gomock.Call -type CommitServiceClientCommitStatsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCommitStatsCall) Return(arg0 *gitalypb.CommitStatsResponse, arg1 error) *CommitServiceClientCommitStatsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCommitStatsCall) Do(f func(context.Context, *gitalypb.CommitStatsRequest, ...grpc.CallOption) (*gitalypb.CommitStatsResponse, error)) *CommitServiceClientCommitStatsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCommitStatsCall) DoAndReturn(f func(context.Context, *gitalypb.CommitStatsRequest, ...grpc.CallOption) (*gitalypb.CommitStatsResponse, error)) *CommitServiceClientCommitStatsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CommitsByMessage mocks base method. -func (m *MockCommitServiceClient) CommitsByMessage(arg0 context.Context, arg1 *gitalypb.CommitsByMessageRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_CommitsByMessageClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CommitsByMessage", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_CommitsByMessageClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CommitsByMessage indicates an expected call of CommitsByMessage. -func (mr *MockCommitServiceClientMockRecorder) CommitsByMessage(arg0, arg1 any, arg2 ...any) *CommitServiceClientCommitsByMessageCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitsByMessage", reflect.TypeOf((*MockCommitServiceClient)(nil).CommitsByMessage), varargs...) - return &CommitServiceClientCommitsByMessageCall{Call: call} -} - -// CommitServiceClientCommitsByMessageCall wrap *gomock.Call -type CommitServiceClientCommitsByMessageCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCommitsByMessageCall) Return(arg0 gitalypb.CommitService_CommitsByMessageClient, arg1 error) *CommitServiceClientCommitsByMessageCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCommitsByMessageCall) Do(f func(context.Context, *gitalypb.CommitsByMessageRequest, ...grpc.CallOption) (gitalypb.CommitService_CommitsByMessageClient, error)) *CommitServiceClientCommitsByMessageCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCommitsByMessageCall) DoAndReturn(f func(context.Context, *gitalypb.CommitsByMessageRequest, ...grpc.CallOption) (gitalypb.CommitService_CommitsByMessageClient, error)) *CommitServiceClientCommitsByMessageCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CountCommits mocks base method. -func (m *MockCommitServiceClient) CountCommits(arg0 context.Context, arg1 *gitalypb.CountCommitsRequest, arg2 ...grpc.CallOption) (*gitalypb.CountCommitsResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CountCommits", varargs...) - ret0, _ := ret[0].(*gitalypb.CountCommitsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CountCommits indicates an expected call of CountCommits. -func (mr *MockCommitServiceClientMockRecorder) CountCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientCountCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).CountCommits), varargs...) - return &CommitServiceClientCountCommitsCall{Call: call} -} - -// CommitServiceClientCountCommitsCall wrap *gomock.Call -type CommitServiceClientCountCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCountCommitsCall) Return(arg0 *gitalypb.CountCommitsResponse, arg1 error) *CommitServiceClientCountCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCountCommitsCall) Do(f func(context.Context, *gitalypb.CountCommitsRequest, ...grpc.CallOption) (*gitalypb.CountCommitsResponse, error)) *CommitServiceClientCountCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCountCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.CountCommitsRequest, ...grpc.CallOption) (*gitalypb.CountCommitsResponse, error)) *CommitServiceClientCountCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// CountDivergingCommits mocks base method. -func (m *MockCommitServiceClient) CountDivergingCommits(arg0 context.Context, arg1 *gitalypb.CountDivergingCommitsRequest, arg2 ...grpc.CallOption) (*gitalypb.CountDivergingCommitsResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CountDivergingCommits", varargs...) - ret0, _ := ret[0].(*gitalypb.CountDivergingCommitsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CountDivergingCommits indicates an expected call of CountDivergingCommits. -func (mr *MockCommitServiceClientMockRecorder) CountDivergingCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientCountDivergingCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountDivergingCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).CountDivergingCommits), varargs...) - return &CommitServiceClientCountDivergingCommitsCall{Call: call} -} - -// CommitServiceClientCountDivergingCommitsCall wrap *gomock.Call -type CommitServiceClientCountDivergingCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientCountDivergingCommitsCall) Return(arg0 *gitalypb.CountDivergingCommitsResponse, arg1 error) *CommitServiceClientCountDivergingCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientCountDivergingCommitsCall) Do(f func(context.Context, *gitalypb.CountDivergingCommitsRequest, ...grpc.CallOption) (*gitalypb.CountDivergingCommitsResponse, error)) *CommitServiceClientCountDivergingCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientCountDivergingCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.CountDivergingCommitsRequest, ...grpc.CallOption) (*gitalypb.CountDivergingCommitsResponse, error)) *CommitServiceClientCountDivergingCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// FilterShasWithSignatures mocks base method. -func (m *MockCommitServiceClient) FilterShasWithSignatures(arg0 context.Context, arg1 ...grpc.CallOption) (gitalypb.CommitService_FilterShasWithSignaturesClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "FilterShasWithSignatures", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_FilterShasWithSignaturesClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// FilterShasWithSignatures indicates an expected call of FilterShasWithSignatures. -func (mr *MockCommitServiceClientMockRecorder) FilterShasWithSignatures(arg0 any, arg1 ...any) *CommitServiceClientFilterShasWithSignaturesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterShasWithSignatures", reflect.TypeOf((*MockCommitServiceClient)(nil).FilterShasWithSignatures), varargs...) - return &CommitServiceClientFilterShasWithSignaturesCall{Call: call} -} - -// CommitServiceClientFilterShasWithSignaturesCall wrap *gomock.Call -type CommitServiceClientFilterShasWithSignaturesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientFilterShasWithSignaturesCall) Return(arg0 gitalypb.CommitService_FilterShasWithSignaturesClient, arg1 error) *CommitServiceClientFilterShasWithSignaturesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientFilterShasWithSignaturesCall) Do(f func(context.Context, ...grpc.CallOption) (gitalypb.CommitService_FilterShasWithSignaturesClient, error)) *CommitServiceClientFilterShasWithSignaturesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientFilterShasWithSignaturesCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (gitalypb.CommitService_FilterShasWithSignaturesClient, error)) *CommitServiceClientFilterShasWithSignaturesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// FindAllCommits mocks base method. -func (m *MockCommitServiceClient) FindAllCommits(arg0 context.Context, arg1 *gitalypb.FindAllCommitsRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_FindAllCommitsClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "FindAllCommits", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_FindAllCommitsClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// FindAllCommits indicates an expected call of FindAllCommits. -func (mr *MockCommitServiceClientMockRecorder) FindAllCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientFindAllCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAllCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).FindAllCommits), varargs...) - return &CommitServiceClientFindAllCommitsCall{Call: call} -} - -// CommitServiceClientFindAllCommitsCall wrap *gomock.Call -type CommitServiceClientFindAllCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientFindAllCommitsCall) Return(arg0 gitalypb.CommitService_FindAllCommitsClient, arg1 error) *CommitServiceClientFindAllCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientFindAllCommitsCall) Do(f func(context.Context, *gitalypb.FindAllCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_FindAllCommitsClient, error)) *CommitServiceClientFindAllCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientFindAllCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.FindAllCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_FindAllCommitsClient, error)) *CommitServiceClientFindAllCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// FindCommit mocks base method. -func (m *MockCommitServiceClient) FindCommit(arg0 context.Context, arg1 *gitalypb.FindCommitRequest, arg2 ...grpc.CallOption) (*gitalypb.FindCommitResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "FindCommit", varargs...) - ret0, _ := ret[0].(*gitalypb.FindCommitResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// FindCommit indicates an expected call of FindCommit. -func (mr *MockCommitServiceClientMockRecorder) FindCommit(arg0, arg1 any, arg2 ...any) *CommitServiceClientFindCommitCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindCommit", reflect.TypeOf((*MockCommitServiceClient)(nil).FindCommit), varargs...) - return &CommitServiceClientFindCommitCall{Call: call} -} - -// CommitServiceClientFindCommitCall wrap *gomock.Call -type CommitServiceClientFindCommitCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientFindCommitCall) Return(arg0 *gitalypb.FindCommitResponse, arg1 error) *CommitServiceClientFindCommitCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientFindCommitCall) Do(f func(context.Context, *gitalypb.FindCommitRequest, ...grpc.CallOption) (*gitalypb.FindCommitResponse, error)) *CommitServiceClientFindCommitCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientFindCommitCall) DoAndReturn(f func(context.Context, *gitalypb.FindCommitRequest, ...grpc.CallOption) (*gitalypb.FindCommitResponse, error)) *CommitServiceClientFindCommitCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// FindCommits mocks base method. -func (m *MockCommitServiceClient) FindCommits(arg0 context.Context, arg1 *gitalypb.FindCommitsRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_FindCommitsClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "FindCommits", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_FindCommitsClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// FindCommits indicates an expected call of FindCommits. -func (mr *MockCommitServiceClientMockRecorder) FindCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientFindCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).FindCommits), varargs...) - return &CommitServiceClientFindCommitsCall{Call: call} -} - -// CommitServiceClientFindCommitsCall wrap *gomock.Call -type CommitServiceClientFindCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientFindCommitsCall) Return(arg0 gitalypb.CommitService_FindCommitsClient, arg1 error) *CommitServiceClientFindCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientFindCommitsCall) Do(f func(context.Context, *gitalypb.FindCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_FindCommitsClient, error)) *CommitServiceClientFindCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientFindCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.FindCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_FindCommitsClient, error)) *CommitServiceClientFindCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// GetCommitMessages mocks base method. -func (m *MockCommitServiceClient) GetCommitMessages(arg0 context.Context, arg1 *gitalypb.GetCommitMessagesRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_GetCommitMessagesClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetCommitMessages", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_GetCommitMessagesClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetCommitMessages indicates an expected call of GetCommitMessages. -func (mr *MockCommitServiceClientMockRecorder) GetCommitMessages(arg0, arg1 any, arg2 ...any) *CommitServiceClientGetCommitMessagesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommitMessages", reflect.TypeOf((*MockCommitServiceClient)(nil).GetCommitMessages), varargs...) - return &CommitServiceClientGetCommitMessagesCall{Call: call} -} - -// CommitServiceClientGetCommitMessagesCall wrap *gomock.Call -type CommitServiceClientGetCommitMessagesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientGetCommitMessagesCall) Return(arg0 gitalypb.CommitService_GetCommitMessagesClient, arg1 error) *CommitServiceClientGetCommitMessagesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientGetCommitMessagesCall) Do(f func(context.Context, *gitalypb.GetCommitMessagesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetCommitMessagesClient, error)) *CommitServiceClientGetCommitMessagesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientGetCommitMessagesCall) DoAndReturn(f func(context.Context, *gitalypb.GetCommitMessagesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetCommitMessagesClient, error)) *CommitServiceClientGetCommitMessagesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// GetCommitSignatures mocks base method. -func (m *MockCommitServiceClient) GetCommitSignatures(arg0 context.Context, arg1 *gitalypb.GetCommitSignaturesRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_GetCommitSignaturesClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetCommitSignatures", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_GetCommitSignaturesClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetCommitSignatures indicates an expected call of GetCommitSignatures. -func (mr *MockCommitServiceClientMockRecorder) GetCommitSignatures(arg0, arg1 any, arg2 ...any) *CommitServiceClientGetCommitSignaturesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommitSignatures", reflect.TypeOf((*MockCommitServiceClient)(nil).GetCommitSignatures), varargs...) - return &CommitServiceClientGetCommitSignaturesCall{Call: call} -} - -// CommitServiceClientGetCommitSignaturesCall wrap *gomock.Call -type CommitServiceClientGetCommitSignaturesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientGetCommitSignaturesCall) Return(arg0 gitalypb.CommitService_GetCommitSignaturesClient, arg1 error) *CommitServiceClientGetCommitSignaturesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientGetCommitSignaturesCall) Do(f func(context.Context, *gitalypb.GetCommitSignaturesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetCommitSignaturesClient, error)) *CommitServiceClientGetCommitSignaturesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientGetCommitSignaturesCall) DoAndReturn(f func(context.Context, *gitalypb.GetCommitSignaturesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetCommitSignaturesClient, error)) *CommitServiceClientGetCommitSignaturesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// GetTreeEntries mocks base method. -func (m *MockCommitServiceClient) GetTreeEntries(arg0 context.Context, arg1 *gitalypb.GetTreeEntriesRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_GetTreeEntriesClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetTreeEntries", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_GetTreeEntriesClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetTreeEntries indicates an expected call of GetTreeEntries. -func (mr *MockCommitServiceClientMockRecorder) GetTreeEntries(arg0, arg1 any, arg2 ...any) *CommitServiceClientGetTreeEntriesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTreeEntries", reflect.TypeOf((*MockCommitServiceClient)(nil).GetTreeEntries), varargs...) - return &CommitServiceClientGetTreeEntriesCall{Call: call} -} - -// CommitServiceClientGetTreeEntriesCall wrap *gomock.Call -type CommitServiceClientGetTreeEntriesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientGetTreeEntriesCall) Return(arg0 gitalypb.CommitService_GetTreeEntriesClient, arg1 error) *CommitServiceClientGetTreeEntriesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientGetTreeEntriesCall) Do(f func(context.Context, *gitalypb.GetTreeEntriesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetTreeEntriesClient, error)) *CommitServiceClientGetTreeEntriesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientGetTreeEntriesCall) DoAndReturn(f func(context.Context, *gitalypb.GetTreeEntriesRequest, ...grpc.CallOption) (gitalypb.CommitService_GetTreeEntriesClient, error)) *CommitServiceClientGetTreeEntriesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// LastCommitForPath mocks base method. -func (m *MockCommitServiceClient) LastCommitForPath(arg0 context.Context, arg1 *gitalypb.LastCommitForPathRequest, arg2 ...grpc.CallOption) (*gitalypb.LastCommitForPathResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "LastCommitForPath", varargs...) - ret0, _ := ret[0].(*gitalypb.LastCommitForPathResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// LastCommitForPath indicates an expected call of LastCommitForPath. -func (mr *MockCommitServiceClientMockRecorder) LastCommitForPath(arg0, arg1 any, arg2 ...any) *CommitServiceClientLastCommitForPathCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastCommitForPath", reflect.TypeOf((*MockCommitServiceClient)(nil).LastCommitForPath), varargs...) - return &CommitServiceClientLastCommitForPathCall{Call: call} -} - -// CommitServiceClientLastCommitForPathCall wrap *gomock.Call -type CommitServiceClientLastCommitForPathCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientLastCommitForPathCall) Return(arg0 *gitalypb.LastCommitForPathResponse, arg1 error) *CommitServiceClientLastCommitForPathCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientLastCommitForPathCall) Do(f func(context.Context, *gitalypb.LastCommitForPathRequest, ...grpc.CallOption) (*gitalypb.LastCommitForPathResponse, error)) *CommitServiceClientLastCommitForPathCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientLastCommitForPathCall) DoAndReturn(f func(context.Context, *gitalypb.LastCommitForPathRequest, ...grpc.CallOption) (*gitalypb.LastCommitForPathResponse, error)) *CommitServiceClientLastCommitForPathCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListAllCommits mocks base method. -func (m *MockCommitServiceClient) ListAllCommits(arg0 context.Context, arg1 *gitalypb.ListAllCommitsRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListAllCommitsClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListAllCommits", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListAllCommitsClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListAllCommits indicates an expected call of ListAllCommits. -func (mr *MockCommitServiceClientMockRecorder) ListAllCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientListAllCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAllCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).ListAllCommits), varargs...) - return &CommitServiceClientListAllCommitsCall{Call: call} -} - -// CommitServiceClientListAllCommitsCall wrap *gomock.Call -type CommitServiceClientListAllCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListAllCommitsCall) Return(arg0 gitalypb.CommitService_ListAllCommitsClient, arg1 error) *CommitServiceClientListAllCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListAllCommitsCall) Do(f func(context.Context, *gitalypb.ListAllCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_ListAllCommitsClient, error)) *CommitServiceClientListAllCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListAllCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.ListAllCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_ListAllCommitsClient, error)) *CommitServiceClientListAllCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListCommits mocks base method. -func (m *MockCommitServiceClient) ListCommits(arg0 context.Context, arg1 *gitalypb.ListCommitsRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListCommitsClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListCommits", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListCommitsClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListCommits indicates an expected call of ListCommits. -func (mr *MockCommitServiceClientMockRecorder) ListCommits(arg0, arg1 any, arg2 ...any) *CommitServiceClientListCommitsCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommits", reflect.TypeOf((*MockCommitServiceClient)(nil).ListCommits), varargs...) - return &CommitServiceClientListCommitsCall{Call: call} -} - -// CommitServiceClientListCommitsCall wrap *gomock.Call -type CommitServiceClientListCommitsCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListCommitsCall) Return(arg0 gitalypb.CommitService_ListCommitsClient, arg1 error) *CommitServiceClientListCommitsCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListCommitsCall) Do(f func(context.Context, *gitalypb.ListCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsClient, error)) *CommitServiceClientListCommitsCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListCommitsCall) DoAndReturn(f func(context.Context, *gitalypb.ListCommitsRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsClient, error)) *CommitServiceClientListCommitsCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListCommitsByOid mocks base method. -func (m *MockCommitServiceClient) ListCommitsByOid(arg0 context.Context, arg1 *gitalypb.ListCommitsByOidRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByOidClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListCommitsByOid", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListCommitsByOidClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListCommitsByOid indicates an expected call of ListCommitsByOid. -func (mr *MockCommitServiceClientMockRecorder) ListCommitsByOid(arg0, arg1 any, arg2 ...any) *CommitServiceClientListCommitsByOidCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommitsByOid", reflect.TypeOf((*MockCommitServiceClient)(nil).ListCommitsByOid), varargs...) - return &CommitServiceClientListCommitsByOidCall{Call: call} -} - -// CommitServiceClientListCommitsByOidCall wrap *gomock.Call -type CommitServiceClientListCommitsByOidCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListCommitsByOidCall) Return(arg0 gitalypb.CommitService_ListCommitsByOidClient, arg1 error) *CommitServiceClientListCommitsByOidCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListCommitsByOidCall) Do(f func(context.Context, *gitalypb.ListCommitsByOidRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByOidClient, error)) *CommitServiceClientListCommitsByOidCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListCommitsByOidCall) DoAndReturn(f func(context.Context, *gitalypb.ListCommitsByOidRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByOidClient, error)) *CommitServiceClientListCommitsByOidCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListCommitsByRefName mocks base method. -func (m *MockCommitServiceClient) ListCommitsByRefName(arg0 context.Context, arg1 *gitalypb.ListCommitsByRefNameRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByRefNameClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListCommitsByRefName", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListCommitsByRefNameClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListCommitsByRefName indicates an expected call of ListCommitsByRefName. -func (mr *MockCommitServiceClientMockRecorder) ListCommitsByRefName(arg0, arg1 any, arg2 ...any) *CommitServiceClientListCommitsByRefNameCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommitsByRefName", reflect.TypeOf((*MockCommitServiceClient)(nil).ListCommitsByRefName), varargs...) - return &CommitServiceClientListCommitsByRefNameCall{Call: call} -} - -// CommitServiceClientListCommitsByRefNameCall wrap *gomock.Call -type CommitServiceClientListCommitsByRefNameCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListCommitsByRefNameCall) Return(arg0 gitalypb.CommitService_ListCommitsByRefNameClient, arg1 error) *CommitServiceClientListCommitsByRefNameCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListCommitsByRefNameCall) Do(f func(context.Context, *gitalypb.ListCommitsByRefNameRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByRefNameClient, error)) *CommitServiceClientListCommitsByRefNameCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListCommitsByRefNameCall) DoAndReturn(f func(context.Context, *gitalypb.ListCommitsByRefNameRequest, ...grpc.CallOption) (gitalypb.CommitService_ListCommitsByRefNameClient, error)) *CommitServiceClientListCommitsByRefNameCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListFiles mocks base method. -func (m *MockCommitServiceClient) ListFiles(arg0 context.Context, arg1 *gitalypb.ListFilesRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListFilesClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListFiles", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListFilesClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListFiles indicates an expected call of ListFiles. -func (mr *MockCommitServiceClientMockRecorder) ListFiles(arg0, arg1 any, arg2 ...any) *CommitServiceClientListFilesCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFiles", reflect.TypeOf((*MockCommitServiceClient)(nil).ListFiles), varargs...) - return &CommitServiceClientListFilesCall{Call: call} -} - -// CommitServiceClientListFilesCall wrap *gomock.Call -type CommitServiceClientListFilesCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListFilesCall) Return(arg0 gitalypb.CommitService_ListFilesClient, arg1 error) *CommitServiceClientListFilesCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListFilesCall) Do(f func(context.Context, *gitalypb.ListFilesRequest, ...grpc.CallOption) (gitalypb.CommitService_ListFilesClient, error)) *CommitServiceClientListFilesCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListFilesCall) DoAndReturn(f func(context.Context, *gitalypb.ListFilesRequest, ...grpc.CallOption) (gitalypb.CommitService_ListFilesClient, error)) *CommitServiceClientListFilesCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// ListLastCommitsForTree mocks base method. -func (m *MockCommitServiceClient) ListLastCommitsForTree(arg0 context.Context, arg1 *gitalypb.ListLastCommitsForTreeRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_ListLastCommitsForTreeClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListLastCommitsForTree", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_ListLastCommitsForTreeClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListLastCommitsForTree indicates an expected call of ListLastCommitsForTree. -func (mr *MockCommitServiceClientMockRecorder) ListLastCommitsForTree(arg0, arg1 any, arg2 ...any) *CommitServiceClientListLastCommitsForTreeCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLastCommitsForTree", reflect.TypeOf((*MockCommitServiceClient)(nil).ListLastCommitsForTree), varargs...) - return &CommitServiceClientListLastCommitsForTreeCall{Call: call} -} - -// CommitServiceClientListLastCommitsForTreeCall wrap *gomock.Call -type CommitServiceClientListLastCommitsForTreeCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientListLastCommitsForTreeCall) Return(arg0 gitalypb.CommitService_ListLastCommitsForTreeClient, arg1 error) *CommitServiceClientListLastCommitsForTreeCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientListLastCommitsForTreeCall) Do(f func(context.Context, *gitalypb.ListLastCommitsForTreeRequest, ...grpc.CallOption) (gitalypb.CommitService_ListLastCommitsForTreeClient, error)) *CommitServiceClientListLastCommitsForTreeCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientListLastCommitsForTreeCall) DoAndReturn(f func(context.Context, *gitalypb.ListLastCommitsForTreeRequest, ...grpc.CallOption) (gitalypb.CommitService_ListLastCommitsForTreeClient, error)) *CommitServiceClientListLastCommitsForTreeCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RawBlame mocks base method. -func (m *MockCommitServiceClient) RawBlame(arg0 context.Context, arg1 *gitalypb.RawBlameRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_RawBlameClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "RawBlame", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_RawBlameClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// RawBlame indicates an expected call of RawBlame. -func (mr *MockCommitServiceClientMockRecorder) RawBlame(arg0, arg1 any, arg2 ...any) *CommitServiceClientRawBlameCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawBlame", reflect.TypeOf((*MockCommitServiceClient)(nil).RawBlame), varargs...) - return &CommitServiceClientRawBlameCall{Call: call} -} - -// CommitServiceClientRawBlameCall wrap *gomock.Call -type CommitServiceClientRawBlameCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientRawBlameCall) Return(arg0 gitalypb.CommitService_RawBlameClient, arg1 error) *CommitServiceClientRawBlameCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientRawBlameCall) Do(f func(context.Context, *gitalypb.RawBlameRequest, ...grpc.CallOption) (gitalypb.CommitService_RawBlameClient, error)) *CommitServiceClientRawBlameCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientRawBlameCall) DoAndReturn(f func(context.Context, *gitalypb.RawBlameRequest, ...grpc.CallOption) (gitalypb.CommitService_RawBlameClient, error)) *CommitServiceClientRawBlameCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// TreeEntry mocks base method. -func (m *MockCommitServiceClient) TreeEntry(arg0 context.Context, arg1 *gitalypb.TreeEntryRequest, arg2 ...grpc.CallOption) (gitalypb.CommitService_TreeEntryClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "TreeEntry", varargs...) - ret0, _ := ret[0].(gitalypb.CommitService_TreeEntryClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// TreeEntry indicates an expected call of TreeEntry. -func (mr *MockCommitServiceClientMockRecorder) TreeEntry(arg0, arg1 any, arg2 ...any) *CommitServiceClientTreeEntryCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeEntry", reflect.TypeOf((*MockCommitServiceClient)(nil).TreeEntry), varargs...) - return &CommitServiceClientTreeEntryCall{Call: call} -} - -// CommitServiceClientTreeEntryCall wrap *gomock.Call -type CommitServiceClientTreeEntryCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitServiceClientTreeEntryCall) Return(arg0 gitalypb.CommitService_TreeEntryClient, arg1 error) *CommitServiceClientTreeEntryCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitServiceClientTreeEntryCall) Do(f func(context.Context, *gitalypb.TreeEntryRequest, ...grpc.CallOption) (gitalypb.CommitService_TreeEntryClient, error)) *CommitServiceClientTreeEntryCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitServiceClientTreeEntryCall) DoAndReturn(f func(context.Context, *gitalypb.TreeEntryRequest, ...grpc.CallOption) (gitalypb.CommitService_TreeEntryClient, error)) *CommitServiceClientTreeEntryCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockCommitService_TreeEntryClient is a mock of CommitService_TreeEntryClient interface. -type MockCommitService_TreeEntryClient struct { - ctrl *gomock.Controller - recorder *MockCommitService_TreeEntryClientMockRecorder -} - -// MockCommitService_TreeEntryClientMockRecorder is the mock recorder for MockCommitService_TreeEntryClient. -type MockCommitService_TreeEntryClientMockRecorder struct { - mock *MockCommitService_TreeEntryClient -} - -// NewMockCommitService_TreeEntryClient creates a new mock instance. -func NewMockCommitService_TreeEntryClient(ctrl *gomock.Controller) *MockCommitService_TreeEntryClient { - mock := &MockCommitService_TreeEntryClient{ctrl: ctrl} - mock.recorder = &MockCommitService_TreeEntryClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCommitService_TreeEntryClient) EXPECT() *MockCommitService_TreeEntryClientMockRecorder { - return m.recorder -} - -// CloseSend mocks base method. -func (m *MockCommitService_TreeEntryClient) CloseSend() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloseSend") - ret0, _ := ret[0].(error) - return ret0 -} - -// CloseSend indicates an expected call of CloseSend. -func (mr *MockCommitService_TreeEntryClientMockRecorder) CloseSend() *CommitService_TreeEntryClientCloseSendCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).CloseSend)) - return &CommitService_TreeEntryClientCloseSendCall{Call: call} -} - -// CommitService_TreeEntryClientCloseSendCall wrap *gomock.Call -type CommitService_TreeEntryClientCloseSendCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientCloseSendCall) Return(arg0 error) *CommitService_TreeEntryClientCloseSendCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientCloseSendCall) Do(f func() error) *CommitService_TreeEntryClientCloseSendCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientCloseSendCall) DoAndReturn(f func() error) *CommitService_TreeEntryClientCloseSendCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Context mocks base method. -func (m *MockCommitService_TreeEntryClient) Context() context.Context { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Context") - ret0, _ := ret[0].(context.Context) - return ret0 -} - -// Context indicates an expected call of Context. -func (mr *MockCommitService_TreeEntryClientMockRecorder) Context() *CommitService_TreeEntryClientContextCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).Context)) - return &CommitService_TreeEntryClientContextCall{Call: call} -} - -// CommitService_TreeEntryClientContextCall wrap *gomock.Call -type CommitService_TreeEntryClientContextCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientContextCall) Return(arg0 context.Context) *CommitService_TreeEntryClientContextCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientContextCall) Do(f func() context.Context) *CommitService_TreeEntryClientContextCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientContextCall) DoAndReturn(f func() context.Context) *CommitService_TreeEntryClientContextCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Header mocks base method. -func (m *MockCommitService_TreeEntryClient) Header() (metadata.MD, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Header") - ret0, _ := ret[0].(metadata.MD) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Header indicates an expected call of Header. -func (mr *MockCommitService_TreeEntryClientMockRecorder) Header() *CommitService_TreeEntryClientHeaderCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).Header)) - return &CommitService_TreeEntryClientHeaderCall{Call: call} -} - -// CommitService_TreeEntryClientHeaderCall wrap *gomock.Call -type CommitService_TreeEntryClientHeaderCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientHeaderCall) Return(arg0 metadata.MD, arg1 error) *CommitService_TreeEntryClientHeaderCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientHeaderCall) Do(f func() (metadata.MD, error)) *CommitService_TreeEntryClientHeaderCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientHeaderCall) DoAndReturn(f func() (metadata.MD, error)) *CommitService_TreeEntryClientHeaderCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Recv mocks base method. -func (m *MockCommitService_TreeEntryClient) Recv() (*gitalypb.TreeEntryResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*gitalypb.TreeEntryResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Recv indicates an expected call of Recv. -func (mr *MockCommitService_TreeEntryClientMockRecorder) Recv() *CommitService_TreeEntryClientRecvCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).Recv)) - return &CommitService_TreeEntryClientRecvCall{Call: call} -} - -// CommitService_TreeEntryClientRecvCall wrap *gomock.Call -type CommitService_TreeEntryClientRecvCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientRecvCall) Return(arg0 *gitalypb.TreeEntryResponse, arg1 error) *CommitService_TreeEntryClientRecvCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientRecvCall) Do(f func() (*gitalypb.TreeEntryResponse, error)) *CommitService_TreeEntryClientRecvCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientRecvCall) DoAndReturn(f func() (*gitalypb.TreeEntryResponse, error)) *CommitService_TreeEntryClientRecvCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RecvMsg mocks base method. -func (m *MockCommitService_TreeEntryClient) RecvMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecvMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// RecvMsg indicates an expected call of RecvMsg. -func (mr *MockCommitService_TreeEntryClientMockRecorder) RecvMsg(arg0 any) *CommitService_TreeEntryClientRecvMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).RecvMsg), arg0) - return &CommitService_TreeEntryClientRecvMsgCall{Call: call} -} - -// CommitService_TreeEntryClientRecvMsgCall wrap *gomock.Call -type CommitService_TreeEntryClientRecvMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientRecvMsgCall) Return(arg0 error) *CommitService_TreeEntryClientRecvMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientRecvMsgCall) Do(f func(any) error) *CommitService_TreeEntryClientRecvMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientRecvMsgCall) DoAndReturn(f func(any) error) *CommitService_TreeEntryClientRecvMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// SendMsg mocks base method. -func (m *MockCommitService_TreeEntryClient) SendMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendMsg indicates an expected call of SendMsg. -func (mr *MockCommitService_TreeEntryClientMockRecorder) SendMsg(arg0 any) *CommitService_TreeEntryClientSendMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).SendMsg), arg0) - return &CommitService_TreeEntryClientSendMsgCall{Call: call} -} - -// CommitService_TreeEntryClientSendMsgCall wrap *gomock.Call -type CommitService_TreeEntryClientSendMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientSendMsgCall) Return(arg0 error) *CommitService_TreeEntryClientSendMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientSendMsgCall) Do(f func(any) error) *CommitService_TreeEntryClientSendMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientSendMsgCall) DoAndReturn(f func(any) error) *CommitService_TreeEntryClientSendMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Trailer mocks base method. -func (m *MockCommitService_TreeEntryClient) Trailer() metadata.MD { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Trailer") - ret0, _ := ret[0].(metadata.MD) - return ret0 -} - -// Trailer indicates an expected call of Trailer. -func (mr *MockCommitService_TreeEntryClientMockRecorder) Trailer() *CommitService_TreeEntryClientTrailerCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockCommitService_TreeEntryClient)(nil).Trailer)) - return &CommitService_TreeEntryClientTrailerCall{Call: call} -} - -// CommitService_TreeEntryClientTrailerCall wrap *gomock.Call -type CommitService_TreeEntryClientTrailerCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_TreeEntryClientTrailerCall) Return(arg0 metadata.MD) *CommitService_TreeEntryClientTrailerCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_TreeEntryClientTrailerCall) Do(f func() metadata.MD) *CommitService_TreeEntryClientTrailerCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_TreeEntryClientTrailerCall) DoAndReturn(f func() metadata.MD) *CommitService_TreeEntryClientTrailerCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockSmartHTTPServiceClient is a mock of SmartHTTPServiceClient interface. -type MockSmartHTTPServiceClient struct { - ctrl *gomock.Controller - recorder *MockSmartHTTPServiceClientMockRecorder -} - -// MockSmartHTTPServiceClientMockRecorder is the mock recorder for MockSmartHTTPServiceClient. -type MockSmartHTTPServiceClientMockRecorder struct { - mock *MockSmartHTTPServiceClient -} - -// NewMockSmartHTTPServiceClient creates a new mock instance. -func NewMockSmartHTTPServiceClient(ctrl *gomock.Controller) *MockSmartHTTPServiceClient { - mock := &MockSmartHTTPServiceClient{ctrl: ctrl} - mock.recorder = &MockSmartHTTPServiceClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSmartHTTPServiceClient) EXPECT() *MockSmartHTTPServiceClientMockRecorder { - return m.recorder -} - -// InfoRefsReceivePack mocks base method. -func (m *MockSmartHTTPServiceClient) InfoRefsReceivePack(arg0 context.Context, arg1 *gitalypb.InfoRefsRequest, arg2 ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsReceivePackClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "InfoRefsReceivePack", varargs...) - ret0, _ := ret[0].(gitalypb.SmartHTTPService_InfoRefsReceivePackClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// InfoRefsReceivePack indicates an expected call of InfoRefsReceivePack. -func (mr *MockSmartHTTPServiceClientMockRecorder) InfoRefsReceivePack(arg0, arg1 any, arg2 ...any) *SmartHTTPServiceClientInfoRefsReceivePackCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InfoRefsReceivePack", reflect.TypeOf((*MockSmartHTTPServiceClient)(nil).InfoRefsReceivePack), varargs...) - return &SmartHTTPServiceClientInfoRefsReceivePackCall{Call: call} -} - -// SmartHTTPServiceClientInfoRefsReceivePackCall wrap *gomock.Call -type SmartHTTPServiceClientInfoRefsReceivePackCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPServiceClientInfoRefsReceivePackCall) Return(arg0 gitalypb.SmartHTTPService_InfoRefsReceivePackClient, arg1 error) *SmartHTTPServiceClientInfoRefsReceivePackCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPServiceClientInfoRefsReceivePackCall) Do(f func(context.Context, *gitalypb.InfoRefsRequest, ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsReceivePackClient, error)) *SmartHTTPServiceClientInfoRefsReceivePackCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPServiceClientInfoRefsReceivePackCall) DoAndReturn(f func(context.Context, *gitalypb.InfoRefsRequest, ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsReceivePackClient, error)) *SmartHTTPServiceClientInfoRefsReceivePackCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// InfoRefsUploadPack mocks base method. -func (m *MockSmartHTTPServiceClient) InfoRefsUploadPack(arg0 context.Context, arg1 *gitalypb.InfoRefsRequest, arg2 ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsUploadPackClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "InfoRefsUploadPack", varargs...) - ret0, _ := ret[0].(gitalypb.SmartHTTPService_InfoRefsUploadPackClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// InfoRefsUploadPack indicates an expected call of InfoRefsUploadPack. -func (mr *MockSmartHTTPServiceClientMockRecorder) InfoRefsUploadPack(arg0, arg1 any, arg2 ...any) *SmartHTTPServiceClientInfoRefsUploadPackCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InfoRefsUploadPack", reflect.TypeOf((*MockSmartHTTPServiceClient)(nil).InfoRefsUploadPack), varargs...) - return &SmartHTTPServiceClientInfoRefsUploadPackCall{Call: call} -} - -// SmartHTTPServiceClientInfoRefsUploadPackCall wrap *gomock.Call -type SmartHTTPServiceClientInfoRefsUploadPackCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPServiceClientInfoRefsUploadPackCall) Return(arg0 gitalypb.SmartHTTPService_InfoRefsUploadPackClient, arg1 error) *SmartHTTPServiceClientInfoRefsUploadPackCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPServiceClientInfoRefsUploadPackCall) Do(f func(context.Context, *gitalypb.InfoRefsRequest, ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsUploadPackClient, error)) *SmartHTTPServiceClientInfoRefsUploadPackCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPServiceClientInfoRefsUploadPackCall) DoAndReturn(f func(context.Context, *gitalypb.InfoRefsRequest, ...grpc.CallOption) (gitalypb.SmartHTTPService_InfoRefsUploadPackClient, error)) *SmartHTTPServiceClientInfoRefsUploadPackCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// PostReceivePack mocks base method. -func (m *MockSmartHTTPServiceClient) PostReceivePack(arg0 context.Context, arg1 ...grpc.CallOption) (gitalypb.SmartHTTPService_PostReceivePackClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "PostReceivePack", varargs...) - ret0, _ := ret[0].(gitalypb.SmartHTTPService_PostReceivePackClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// PostReceivePack indicates an expected call of PostReceivePack. -func (mr *MockSmartHTTPServiceClientMockRecorder) PostReceivePack(arg0 any, arg1 ...any) *SmartHTTPServiceClientPostReceivePackCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostReceivePack", reflect.TypeOf((*MockSmartHTTPServiceClient)(nil).PostReceivePack), varargs...) - return &SmartHTTPServiceClientPostReceivePackCall{Call: call} -} - -// SmartHTTPServiceClientPostReceivePackCall wrap *gomock.Call -type SmartHTTPServiceClientPostReceivePackCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPServiceClientPostReceivePackCall) Return(arg0 gitalypb.SmartHTTPService_PostReceivePackClient, arg1 error) *SmartHTTPServiceClientPostReceivePackCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPServiceClientPostReceivePackCall) Do(f func(context.Context, ...grpc.CallOption) (gitalypb.SmartHTTPService_PostReceivePackClient, error)) *SmartHTTPServiceClientPostReceivePackCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPServiceClientPostReceivePackCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (gitalypb.SmartHTTPService_PostReceivePackClient, error)) *SmartHTTPServiceClientPostReceivePackCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// PostUploadPackWithSidechannel mocks base method. -func (m *MockSmartHTTPServiceClient) PostUploadPackWithSidechannel(arg0 context.Context, arg1 *gitalypb.PostUploadPackWithSidechannelRequest, arg2 ...grpc.CallOption) (*gitalypb.PostUploadPackWithSidechannelResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "PostUploadPackWithSidechannel", varargs...) - ret0, _ := ret[0].(*gitalypb.PostUploadPackWithSidechannelResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// PostUploadPackWithSidechannel indicates an expected call of PostUploadPackWithSidechannel. -func (mr *MockSmartHTTPServiceClientMockRecorder) PostUploadPackWithSidechannel(arg0, arg1 any, arg2 ...any) *SmartHTTPServiceClientPostUploadPackWithSidechannelCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostUploadPackWithSidechannel", reflect.TypeOf((*MockSmartHTTPServiceClient)(nil).PostUploadPackWithSidechannel), varargs...) - return &SmartHTTPServiceClientPostUploadPackWithSidechannelCall{Call: call} -} - -// SmartHTTPServiceClientPostUploadPackWithSidechannelCall wrap *gomock.Call -type SmartHTTPServiceClientPostUploadPackWithSidechannelCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPServiceClientPostUploadPackWithSidechannelCall) Return(arg0 *gitalypb.PostUploadPackWithSidechannelResponse, arg1 error) *SmartHTTPServiceClientPostUploadPackWithSidechannelCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPServiceClientPostUploadPackWithSidechannelCall) Do(f func(context.Context, *gitalypb.PostUploadPackWithSidechannelRequest, ...grpc.CallOption) (*gitalypb.PostUploadPackWithSidechannelResponse, error)) *SmartHTTPServiceClientPostUploadPackWithSidechannelCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPServiceClientPostUploadPackWithSidechannelCall) DoAndReturn(f func(context.Context, *gitalypb.PostUploadPackWithSidechannelRequest, ...grpc.CallOption) (*gitalypb.PostUploadPackWithSidechannelResponse, error)) *SmartHTTPServiceClientPostUploadPackWithSidechannelCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockSmartHTTPService_InfoRefsUploadPackClient is a mock of SmartHTTPService_InfoRefsUploadPackClient interface. -type MockSmartHTTPService_InfoRefsUploadPackClient struct { - ctrl *gomock.Controller - recorder *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder -} - -// MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder is the mock recorder for MockSmartHTTPService_InfoRefsUploadPackClient. -type MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder struct { - mock *MockSmartHTTPService_InfoRefsUploadPackClient -} - -// NewMockSmartHTTPService_InfoRefsUploadPackClient creates a new mock instance. -func NewMockSmartHTTPService_InfoRefsUploadPackClient(ctrl *gomock.Controller) *MockSmartHTTPService_InfoRefsUploadPackClient { - mock := &MockSmartHTTPService_InfoRefsUploadPackClient{ctrl: ctrl} - mock.recorder = &MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) EXPECT() *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder { - return m.recorder -} - -// CloseSend mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) CloseSend() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloseSend") - ret0, _ := ret[0].(error) - return ret0 -} - -// CloseSend indicates an expected call of CloseSend. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) CloseSend() *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).CloseSend)) - return &SmartHTTPService_InfoRefsUploadPackClientCloseSendCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientCloseSendCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientCloseSendCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall) Return(arg0 error) *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall) Do(f func() error) *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall) DoAndReturn(f func() error) *SmartHTTPService_InfoRefsUploadPackClientCloseSendCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Context mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) Context() context.Context { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Context") - ret0, _ := ret[0].(context.Context) - return ret0 -} - -// Context indicates an expected call of Context. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) Context() *SmartHTTPService_InfoRefsUploadPackClientContextCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).Context)) - return &SmartHTTPService_InfoRefsUploadPackClientContextCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientContextCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientContextCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientContextCall) Return(arg0 context.Context) *SmartHTTPService_InfoRefsUploadPackClientContextCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientContextCall) Do(f func() context.Context) *SmartHTTPService_InfoRefsUploadPackClientContextCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientContextCall) DoAndReturn(f func() context.Context) *SmartHTTPService_InfoRefsUploadPackClientContextCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Header mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) Header() (metadata.MD, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Header") - ret0, _ := ret[0].(metadata.MD) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Header indicates an expected call of Header. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) Header() *SmartHTTPService_InfoRefsUploadPackClientHeaderCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).Header)) - return &SmartHTTPService_InfoRefsUploadPackClientHeaderCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientHeaderCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientHeaderCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientHeaderCall) Return(arg0 metadata.MD, arg1 error) *SmartHTTPService_InfoRefsUploadPackClientHeaderCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientHeaderCall) Do(f func() (metadata.MD, error)) *SmartHTTPService_InfoRefsUploadPackClientHeaderCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientHeaderCall) DoAndReturn(f func() (metadata.MD, error)) *SmartHTTPService_InfoRefsUploadPackClientHeaderCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Recv mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) Recv() (*gitalypb.InfoRefsResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*gitalypb.InfoRefsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Recv indicates an expected call of Recv. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) Recv() *SmartHTTPService_InfoRefsUploadPackClientRecvCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).Recv)) - return &SmartHTTPService_InfoRefsUploadPackClientRecvCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientRecvCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientRecvCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvCall) Return(arg0 *gitalypb.InfoRefsResponse, arg1 error) *SmartHTTPService_InfoRefsUploadPackClientRecvCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvCall) Do(f func() (*gitalypb.InfoRefsResponse, error)) *SmartHTTPService_InfoRefsUploadPackClientRecvCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvCall) DoAndReturn(f func() (*gitalypb.InfoRefsResponse, error)) *SmartHTTPService_InfoRefsUploadPackClientRecvCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RecvMsg mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) RecvMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecvMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// RecvMsg indicates an expected call of RecvMsg. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) RecvMsg(arg0 any) *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).RecvMsg), arg0) - return &SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall) Return(arg0 error) *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall) Do(f func(any) error) *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall) DoAndReturn(f func(any) error) *SmartHTTPService_InfoRefsUploadPackClientRecvMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// SendMsg mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) SendMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendMsg indicates an expected call of SendMsg. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) SendMsg(arg0 any) *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).SendMsg), arg0) - return &SmartHTTPService_InfoRefsUploadPackClientSendMsgCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientSendMsgCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientSendMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall) Return(arg0 error) *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall) Do(f func(any) error) *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall) DoAndReturn(f func(any) error) *SmartHTTPService_InfoRefsUploadPackClientSendMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Trailer mocks base method. -func (m *MockSmartHTTPService_InfoRefsUploadPackClient) Trailer() metadata.MD { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Trailer") - ret0, _ := ret[0].(metadata.MD) - return ret0 -} - -// Trailer indicates an expected call of Trailer. -func (mr *MockSmartHTTPService_InfoRefsUploadPackClientMockRecorder) Trailer() *SmartHTTPService_InfoRefsUploadPackClientTrailerCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockSmartHTTPService_InfoRefsUploadPackClient)(nil).Trailer)) - return &SmartHTTPService_InfoRefsUploadPackClientTrailerCall{Call: call} -} - -// SmartHTTPService_InfoRefsUploadPackClientTrailerCall wrap *gomock.Call -type SmartHTTPService_InfoRefsUploadPackClientTrailerCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *SmartHTTPService_InfoRefsUploadPackClientTrailerCall) Return(arg0 metadata.MD) *SmartHTTPService_InfoRefsUploadPackClientTrailerCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *SmartHTTPService_InfoRefsUploadPackClientTrailerCall) Do(f func() metadata.MD) *SmartHTTPService_InfoRefsUploadPackClientTrailerCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmartHTTPService_InfoRefsUploadPackClientTrailerCall) DoAndReturn(f func() metadata.MD) *SmartHTTPService_InfoRefsUploadPackClientTrailerCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockCommitService_GetTreeEntriesClient is a mock of CommitService_GetTreeEntriesClient interface. -type MockCommitService_GetTreeEntriesClient struct { - ctrl *gomock.Controller - recorder *MockCommitService_GetTreeEntriesClientMockRecorder -} - -// MockCommitService_GetTreeEntriesClientMockRecorder is the mock recorder for MockCommitService_GetTreeEntriesClient. -type MockCommitService_GetTreeEntriesClientMockRecorder struct { - mock *MockCommitService_GetTreeEntriesClient -} - -// NewMockCommitService_GetTreeEntriesClient creates a new mock instance. -func NewMockCommitService_GetTreeEntriesClient(ctrl *gomock.Controller) *MockCommitService_GetTreeEntriesClient { - mock := &MockCommitService_GetTreeEntriesClient{ctrl: ctrl} - mock.recorder = &MockCommitService_GetTreeEntriesClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCommitService_GetTreeEntriesClient) EXPECT() *MockCommitService_GetTreeEntriesClientMockRecorder { - return m.recorder -} - -// CloseSend mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) CloseSend() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloseSend") - ret0, _ := ret[0].(error) - return ret0 -} - -// CloseSend indicates an expected call of CloseSend. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) CloseSend() *CommitService_GetTreeEntriesClientCloseSendCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).CloseSend)) - return &CommitService_GetTreeEntriesClientCloseSendCall{Call: call} -} - -// CommitService_GetTreeEntriesClientCloseSendCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientCloseSendCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientCloseSendCall) Return(arg0 error) *CommitService_GetTreeEntriesClientCloseSendCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientCloseSendCall) Do(f func() error) *CommitService_GetTreeEntriesClientCloseSendCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientCloseSendCall) DoAndReturn(f func() error) *CommitService_GetTreeEntriesClientCloseSendCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Context mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) Context() context.Context { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Context") - ret0, _ := ret[0].(context.Context) - return ret0 -} - -// Context indicates an expected call of Context. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) Context() *CommitService_GetTreeEntriesClientContextCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).Context)) - return &CommitService_GetTreeEntriesClientContextCall{Call: call} -} - -// CommitService_GetTreeEntriesClientContextCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientContextCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientContextCall) Return(arg0 context.Context) *CommitService_GetTreeEntriesClientContextCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientContextCall) Do(f func() context.Context) *CommitService_GetTreeEntriesClientContextCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientContextCall) DoAndReturn(f func() context.Context) *CommitService_GetTreeEntriesClientContextCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Header mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) Header() (metadata.MD, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Header") - ret0, _ := ret[0].(metadata.MD) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Header indicates an expected call of Header. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) Header() *CommitService_GetTreeEntriesClientHeaderCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).Header)) - return &CommitService_GetTreeEntriesClientHeaderCall{Call: call} -} - -// CommitService_GetTreeEntriesClientHeaderCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientHeaderCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientHeaderCall) Return(arg0 metadata.MD, arg1 error) *CommitService_GetTreeEntriesClientHeaderCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientHeaderCall) Do(f func() (metadata.MD, error)) *CommitService_GetTreeEntriesClientHeaderCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientHeaderCall) DoAndReturn(f func() (metadata.MD, error)) *CommitService_GetTreeEntriesClientHeaderCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Recv mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) Recv() (*gitalypb.GetTreeEntriesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*gitalypb.GetTreeEntriesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Recv indicates an expected call of Recv. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) Recv() *CommitService_GetTreeEntriesClientRecvCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).Recv)) - return &CommitService_GetTreeEntriesClientRecvCall{Call: call} -} - -// CommitService_GetTreeEntriesClientRecvCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientRecvCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientRecvCall) Return(arg0 *gitalypb.GetTreeEntriesResponse, arg1 error) *CommitService_GetTreeEntriesClientRecvCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientRecvCall) Do(f func() (*gitalypb.GetTreeEntriesResponse, error)) *CommitService_GetTreeEntriesClientRecvCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientRecvCall) DoAndReturn(f func() (*gitalypb.GetTreeEntriesResponse, error)) *CommitService_GetTreeEntriesClientRecvCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RecvMsg mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) RecvMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecvMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// RecvMsg indicates an expected call of RecvMsg. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) RecvMsg(arg0 any) *CommitService_GetTreeEntriesClientRecvMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).RecvMsg), arg0) - return &CommitService_GetTreeEntriesClientRecvMsgCall{Call: call} -} - -// CommitService_GetTreeEntriesClientRecvMsgCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientRecvMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientRecvMsgCall) Return(arg0 error) *CommitService_GetTreeEntriesClientRecvMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientRecvMsgCall) Do(f func(any) error) *CommitService_GetTreeEntriesClientRecvMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientRecvMsgCall) DoAndReturn(f func(any) error) *CommitService_GetTreeEntriesClientRecvMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// SendMsg mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) SendMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendMsg indicates an expected call of SendMsg. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) SendMsg(arg0 any) *CommitService_GetTreeEntriesClientSendMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).SendMsg), arg0) - return &CommitService_GetTreeEntriesClientSendMsgCall{Call: call} -} - -// CommitService_GetTreeEntriesClientSendMsgCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientSendMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientSendMsgCall) Return(arg0 error) *CommitService_GetTreeEntriesClientSendMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientSendMsgCall) Do(f func(any) error) *CommitService_GetTreeEntriesClientSendMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientSendMsgCall) DoAndReturn(f func(any) error) *CommitService_GetTreeEntriesClientSendMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Trailer mocks base method. -func (m *MockCommitService_GetTreeEntriesClient) Trailer() metadata.MD { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Trailer") - ret0, _ := ret[0].(metadata.MD) - return ret0 -} - -// Trailer indicates an expected call of Trailer. -func (mr *MockCommitService_GetTreeEntriesClientMockRecorder) Trailer() *CommitService_GetTreeEntriesClientTrailerCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockCommitService_GetTreeEntriesClient)(nil).Trailer)) - return &CommitService_GetTreeEntriesClientTrailerCall{Call: call} -} - -// CommitService_GetTreeEntriesClientTrailerCall wrap *gomock.Call -type CommitService_GetTreeEntriesClientTrailerCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CommitService_GetTreeEntriesClientTrailerCall) Return(arg0 metadata.MD) *CommitService_GetTreeEntriesClientTrailerCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CommitService_GetTreeEntriesClientTrailerCall) Do(f func() metadata.MD) *CommitService_GetTreeEntriesClientTrailerCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CommitService_GetTreeEntriesClientTrailerCall) DoAndReturn(f func() metadata.MD) *CommitService_GetTreeEntriesClientTrailerCall { - c.Call = c.Call.DoAndReturn(f) - return c -} diff --git a/internal/tool/testing/mock_gitlab/BUILD.bazel b/internal/tool/testing/mock_gitlab/BUILD.bazel deleted file mode 100644 index ebd4df36..00000000 --- a/internal/tool/testing/mock_gitlab/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "mock_gitlab", - testonly = True, - srcs = ["testing_helpers.go"], - importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/testing/mock_gitlab", - visibility = ["//:__subpackages__"], - deps = [ - "//internal/gitlab", - "//internal/tool/testing/testhelpers", - "@com_github_hashicorp_go_retryablehttp//:go-retryablehttp", - "@com_github_stretchr_testify//require", - "@io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:otelhttp", - "@io_opentelemetry_go_otel//propagation", - ], -) diff --git a/internal/tool/testing/mock_gitlab/testing_helpers.go b/internal/tool/testing/mock_gitlab/testing_helpers.go deleted file mode 100644 index fa2e3ab5..00000000 --- a/internal/tool/testing/mock_gitlab/testing_helpers.go +++ /dev/null @@ -1,35 +0,0 @@ -package mock_gitlab - -import ( - "net/http" - "net/http/httptest" - "net/url" - "testing" - - "github.com/hashicorp/go-retryablehttp" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitlab" - "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/testing/testhelpers" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - "go.opentelemetry.io/otel/propagation" -) - -func SetupClient(t *testing.T, pattern string, handler func(http.ResponseWriter, *http.Request)) *gitlab.Client { - propagator := propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}) - - r := http.NewServeMux() - r.HandleFunc(pattern, handler) - h := otelhttp.NewHandler(r, "gitlab-request", otelhttp.WithPropagators(propagator)) - s := httptest.NewServer(h) - t.Cleanup(s.Close) - - u, err := url.Parse(s.URL) - require.NoError(t, err) - return gitlab.NewClient(u, []byte(testhelpers.AuthSecretKey), - gitlab.WithUserAgent(testhelpers.KasUserAgent), - gitlab.WithTextMapPropagator(propagator), - gitlab.WithRetryConfig(gitlab.RetryConfig{ - CheckRetry: retryablehttp.DefaultRetryPolicy, - }), // disable retries - ) -} diff --git a/internal/tool/testing/mock_gitlab_access/BUILD.bazel b/internal/tool/testing/mock_gitlab_access/BUILD.bazel deleted file mode 100644 index 67a8cc43..00000000 --- a/internal/tool/testing/mock_gitlab_access/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "mock_gitlab_access", - testonly = True, - srcs = [ - "doc.go", - "gitlab_access.go", - ], - importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/testing/mock_gitlab_access", - visibility = ["//:__subpackages__"], - deps = [ - "//internal/module/gitlab_access/rpc", - "//internal/tool/grpctool", - "@org_golang_google_grpc//:grpc", - "@org_golang_google_grpc//metadata", - "@org_uber_go_mock//gomock", - ], -) diff --git a/internal/tool/testing/mock_gitlab_access/doc.go b/internal/tool/testing/mock_gitlab_access/doc.go deleted file mode 100644 index e2fd729f..00000000 --- a/internal/tool/testing/mock_gitlab_access/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Mocks for GitLab access RPC. -package mock_gitlab_access - -//go:generate mockgen.sh -destination "gitlab_access.go" -package "mock_gitlab_access" "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/gitlab_access/rpc" "GitlabAccessClient,GitlabAccess_MakeRequestClient" diff --git a/internal/tool/testing/mock_gitlab_access/gitlab_access.go b/internal/tool/testing/mock_gitlab_access/gitlab_access.go deleted file mode 100644 index 13823405..00000000 --- a/internal/tool/testing/mock_gitlab_access/gitlab_access.go +++ /dev/null @@ -1,416 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/gitlab_access/rpc (interfaces: GitlabAccessClient,GitlabAccess_MakeRequestClient) -// -// Generated by this command: -// -// mockgen -typed -destination gitlab_access.go -package mock_gitlab_access gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/gitlab_access/rpc GitlabAccessClient,GitlabAccess_MakeRequestClient -// -// Package mock_gitlab_access is a generated GoMock package. -package mock_gitlab_access - -import ( - context "context" - reflect "reflect" - - rpc "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/gitlab_access/rpc" - grpctool "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/grpctool" - gomock "go.uber.org/mock/gomock" - grpc "google.golang.org/grpc" - metadata "google.golang.org/grpc/metadata" -) - -// MockGitlabAccessClient is a mock of GitlabAccessClient interface. -type MockGitlabAccessClient struct { - ctrl *gomock.Controller - recorder *MockGitlabAccessClientMockRecorder -} - -// MockGitlabAccessClientMockRecorder is the mock recorder for MockGitlabAccessClient. -type MockGitlabAccessClientMockRecorder struct { - mock *MockGitlabAccessClient -} - -// NewMockGitlabAccessClient creates a new mock instance. -func NewMockGitlabAccessClient(ctrl *gomock.Controller) *MockGitlabAccessClient { - mock := &MockGitlabAccessClient{ctrl: ctrl} - mock.recorder = &MockGitlabAccessClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockGitlabAccessClient) EXPECT() *MockGitlabAccessClientMockRecorder { - return m.recorder -} - -// MakeRequest mocks base method. -func (m *MockGitlabAccessClient) MakeRequest(arg0 context.Context, arg1 ...grpc.CallOption) (rpc.GitlabAccess_MakeRequestClient, error) { - m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "MakeRequest", varargs...) - ret0, _ := ret[0].(rpc.GitlabAccess_MakeRequestClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// MakeRequest indicates an expected call of MakeRequest. -func (mr *MockGitlabAccessClientMockRecorder) MakeRequest(arg0 any, arg1 ...any) *GitlabAccessClientMakeRequestCall { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeRequest", reflect.TypeOf((*MockGitlabAccessClient)(nil).MakeRequest), varargs...) - return &GitlabAccessClientMakeRequestCall{Call: call} -} - -// GitlabAccessClientMakeRequestCall wrap *gomock.Call -type GitlabAccessClientMakeRequestCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccessClientMakeRequestCall) Return(arg0 rpc.GitlabAccess_MakeRequestClient, arg1 error) *GitlabAccessClientMakeRequestCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccessClientMakeRequestCall) Do(f func(context.Context, ...grpc.CallOption) (rpc.GitlabAccess_MakeRequestClient, error)) *GitlabAccessClientMakeRequestCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccessClientMakeRequestCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (rpc.GitlabAccess_MakeRequestClient, error)) *GitlabAccessClientMakeRequestCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockGitlabAccess_MakeRequestClient is a mock of GitlabAccess_MakeRequestClient interface. -type MockGitlabAccess_MakeRequestClient struct { - ctrl *gomock.Controller - recorder *MockGitlabAccess_MakeRequestClientMockRecorder -} - -// MockGitlabAccess_MakeRequestClientMockRecorder is the mock recorder for MockGitlabAccess_MakeRequestClient. -type MockGitlabAccess_MakeRequestClientMockRecorder struct { - mock *MockGitlabAccess_MakeRequestClient -} - -// NewMockGitlabAccess_MakeRequestClient creates a new mock instance. -func NewMockGitlabAccess_MakeRequestClient(ctrl *gomock.Controller) *MockGitlabAccess_MakeRequestClient { - mock := &MockGitlabAccess_MakeRequestClient{ctrl: ctrl} - mock.recorder = &MockGitlabAccess_MakeRequestClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockGitlabAccess_MakeRequestClient) EXPECT() *MockGitlabAccess_MakeRequestClientMockRecorder { - return m.recorder -} - -// CloseSend mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) CloseSend() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloseSend") - ret0, _ := ret[0].(error) - return ret0 -} - -// CloseSend indicates an expected call of CloseSend. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) CloseSend() *GitlabAccess_MakeRequestClientCloseSendCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).CloseSend)) - return &GitlabAccess_MakeRequestClientCloseSendCall{Call: call} -} - -// GitlabAccess_MakeRequestClientCloseSendCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientCloseSendCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientCloseSendCall) Return(arg0 error) *GitlabAccess_MakeRequestClientCloseSendCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientCloseSendCall) Do(f func() error) *GitlabAccess_MakeRequestClientCloseSendCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientCloseSendCall) DoAndReturn(f func() error) *GitlabAccess_MakeRequestClientCloseSendCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Context mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) Context() context.Context { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Context") - ret0, _ := ret[0].(context.Context) - return ret0 -} - -// Context indicates an expected call of Context. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) Context() *GitlabAccess_MakeRequestClientContextCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).Context)) - return &GitlabAccess_MakeRequestClientContextCall{Call: call} -} - -// GitlabAccess_MakeRequestClientContextCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientContextCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientContextCall) Return(arg0 context.Context) *GitlabAccess_MakeRequestClientContextCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientContextCall) Do(f func() context.Context) *GitlabAccess_MakeRequestClientContextCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientContextCall) DoAndReturn(f func() context.Context) *GitlabAccess_MakeRequestClientContextCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Header mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) Header() (metadata.MD, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Header") - ret0, _ := ret[0].(metadata.MD) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Header indicates an expected call of Header. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) Header() *GitlabAccess_MakeRequestClientHeaderCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).Header)) - return &GitlabAccess_MakeRequestClientHeaderCall{Call: call} -} - -// GitlabAccess_MakeRequestClientHeaderCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientHeaderCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientHeaderCall) Return(arg0 metadata.MD, arg1 error) *GitlabAccess_MakeRequestClientHeaderCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientHeaderCall) Do(f func() (metadata.MD, error)) *GitlabAccess_MakeRequestClientHeaderCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientHeaderCall) DoAndReturn(f func() (metadata.MD, error)) *GitlabAccess_MakeRequestClientHeaderCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Recv mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) Recv() (*grpctool.HttpResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*grpctool.HttpResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Recv indicates an expected call of Recv. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) Recv() *GitlabAccess_MakeRequestClientRecvCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).Recv)) - return &GitlabAccess_MakeRequestClientRecvCall{Call: call} -} - -// GitlabAccess_MakeRequestClientRecvCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientRecvCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientRecvCall) Return(arg0 *grpctool.HttpResponse, arg1 error) *GitlabAccess_MakeRequestClientRecvCall { - c.Call = c.Call.Return(arg0, arg1) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientRecvCall) Do(f func() (*grpctool.HttpResponse, error)) *GitlabAccess_MakeRequestClientRecvCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientRecvCall) DoAndReturn(f func() (*grpctool.HttpResponse, error)) *GitlabAccess_MakeRequestClientRecvCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RecvMsg mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) RecvMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecvMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// RecvMsg indicates an expected call of RecvMsg. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) RecvMsg(arg0 any) *GitlabAccess_MakeRequestClientRecvMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).RecvMsg), arg0) - return &GitlabAccess_MakeRequestClientRecvMsgCall{Call: call} -} - -// GitlabAccess_MakeRequestClientRecvMsgCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientRecvMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientRecvMsgCall) Return(arg0 error) *GitlabAccess_MakeRequestClientRecvMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientRecvMsgCall) Do(f func(any) error) *GitlabAccess_MakeRequestClientRecvMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientRecvMsgCall) DoAndReturn(f func(any) error) *GitlabAccess_MakeRequestClientRecvMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Send mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) Send(arg0 *grpctool.HttpRequest) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Send", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// Send indicates an expected call of Send. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) Send(arg0 any) *GitlabAccess_MakeRequestClientSendCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).Send), arg0) - return &GitlabAccess_MakeRequestClientSendCall{Call: call} -} - -// GitlabAccess_MakeRequestClientSendCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientSendCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientSendCall) Return(arg0 error) *GitlabAccess_MakeRequestClientSendCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientSendCall) Do(f func(*grpctool.HttpRequest) error) *GitlabAccess_MakeRequestClientSendCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientSendCall) DoAndReturn(f func(*grpctool.HttpRequest) error) *GitlabAccess_MakeRequestClientSendCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// SendMsg mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) SendMsg(arg0 any) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendMsg", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendMsg indicates an expected call of SendMsg. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) SendMsg(arg0 any) *GitlabAccess_MakeRequestClientSendMsgCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).SendMsg), arg0) - return &GitlabAccess_MakeRequestClientSendMsgCall{Call: call} -} - -// GitlabAccess_MakeRequestClientSendMsgCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientSendMsgCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientSendMsgCall) Return(arg0 error) *GitlabAccess_MakeRequestClientSendMsgCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientSendMsgCall) Do(f func(any) error) *GitlabAccess_MakeRequestClientSendMsgCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientSendMsgCall) DoAndReturn(f func(any) error) *GitlabAccess_MakeRequestClientSendMsgCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Trailer mocks base method. -func (m *MockGitlabAccess_MakeRequestClient) Trailer() metadata.MD { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Trailer") - ret0, _ := ret[0].(metadata.MD) - return ret0 -} - -// Trailer indicates an expected call of Trailer. -func (mr *MockGitlabAccess_MakeRequestClientMockRecorder) Trailer() *GitlabAccess_MakeRequestClientTrailerCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockGitlabAccess_MakeRequestClient)(nil).Trailer)) - return &GitlabAccess_MakeRequestClientTrailerCall{Call: call} -} - -// GitlabAccess_MakeRequestClientTrailerCall wrap *gomock.Call -type GitlabAccess_MakeRequestClientTrailerCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *GitlabAccess_MakeRequestClientTrailerCall) Return(arg0 metadata.MD) *GitlabAccess_MakeRequestClientTrailerCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *GitlabAccess_MakeRequestClientTrailerCall) Do(f func() metadata.MD) *GitlabAccess_MakeRequestClientTrailerCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *GitlabAccess_MakeRequestClientTrailerCall) DoAndReturn(f func() metadata.MD) *GitlabAccess_MakeRequestClientTrailerCall { - c.Call = c.Call.DoAndReturn(f) - return c -} diff --git a/internal/tool/testing/mock_usage_metrics/BUILD.bazel b/internal/tool/testing/mock_usage_metrics/BUILD.bazel deleted file mode 100644 index 58691524..00000000 --- a/internal/tool/testing/mock_usage_metrics/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "mock_usage_metrics", - testonly = True, - srcs = [ - "api.go", - "doc.go", - ], - importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tool/testing/mock_usage_metrics", - visibility = ["//:__subpackages__"], - deps = [ - "//internal/module/usage_metrics", - "@org_uber_go_mock//gomock", - ], -) diff --git a/internal/tool/testing/mock_usage_metrics/api.go b/internal/tool/testing/mock_usage_metrics/api.go deleted file mode 100644 index 7882ae20..00000000 --- a/internal/tool/testing/mock_usage_metrics/api.go +++ /dev/null @@ -1,307 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/usage_metrics (interfaces: UsageTrackerInterface,Counter,UniqueCounter) -// -// Generated by this command: -// -// mockgen -typed -destination api.go gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/usage_metrics UsageTrackerInterface,Counter,UniqueCounter -// -// Package mock_usage_metrics is a generated GoMock package. -package mock_usage_metrics - -import ( - reflect "reflect" - - usage_metrics "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/usage_metrics" - gomock "go.uber.org/mock/gomock" -) - -// MockUsageTrackerInterface is a mock of UsageTrackerInterface interface. -type MockUsageTrackerInterface struct { - ctrl *gomock.Controller - recorder *MockUsageTrackerInterfaceMockRecorder -} - -// MockUsageTrackerInterfaceMockRecorder is the mock recorder for MockUsageTrackerInterface. -type MockUsageTrackerInterfaceMockRecorder struct { - mock *MockUsageTrackerInterface -} - -// NewMockUsageTrackerInterface creates a new mock instance. -func NewMockUsageTrackerInterface(ctrl *gomock.Controller) *MockUsageTrackerInterface { - mock := &MockUsageTrackerInterface{ctrl: ctrl} - mock.recorder = &MockUsageTrackerInterfaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockUsageTrackerInterface) EXPECT() *MockUsageTrackerInterfaceMockRecorder { - return m.recorder -} - -// CloneUsageData mocks base method. -func (m *MockUsageTrackerInterface) CloneUsageData() *usage_metrics.UsageData { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloneUsageData") - ret0, _ := ret[0].(*usage_metrics.UsageData) - return ret0 -} - -// CloneUsageData indicates an expected call of CloneUsageData. -func (mr *MockUsageTrackerInterfaceMockRecorder) CloneUsageData() *UsageTrackerInterfaceCloneUsageDataCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloneUsageData", reflect.TypeOf((*MockUsageTrackerInterface)(nil).CloneUsageData)) - return &UsageTrackerInterfaceCloneUsageDataCall{Call: call} -} - -// UsageTrackerInterfaceCloneUsageDataCall wrap *gomock.Call -type UsageTrackerInterfaceCloneUsageDataCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *UsageTrackerInterfaceCloneUsageDataCall) Return(arg0 *usage_metrics.UsageData) *UsageTrackerInterfaceCloneUsageDataCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *UsageTrackerInterfaceCloneUsageDataCall) Do(f func() *usage_metrics.UsageData) *UsageTrackerInterfaceCloneUsageDataCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *UsageTrackerInterfaceCloneUsageDataCall) DoAndReturn(f func() *usage_metrics.UsageData) *UsageTrackerInterfaceCloneUsageDataCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RegisterCounter mocks base method. -func (m *MockUsageTrackerInterface) RegisterCounter(arg0 string) usage_metrics.Counter { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterCounter", arg0) - ret0, _ := ret[0].(usage_metrics.Counter) - return ret0 -} - -// RegisterCounter indicates an expected call of RegisterCounter. -func (mr *MockUsageTrackerInterfaceMockRecorder) RegisterCounter(arg0 any) *UsageTrackerInterfaceRegisterCounterCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCounter", reflect.TypeOf((*MockUsageTrackerInterface)(nil).RegisterCounter), arg0) - return &UsageTrackerInterfaceRegisterCounterCall{Call: call} -} - -// UsageTrackerInterfaceRegisterCounterCall wrap *gomock.Call -type UsageTrackerInterfaceRegisterCounterCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *UsageTrackerInterfaceRegisterCounterCall) Return(arg0 usage_metrics.Counter) *UsageTrackerInterfaceRegisterCounterCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *UsageTrackerInterfaceRegisterCounterCall) Do(f func(string) usage_metrics.Counter) *UsageTrackerInterfaceRegisterCounterCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *UsageTrackerInterfaceRegisterCounterCall) DoAndReturn(f func(string) usage_metrics.Counter) *UsageTrackerInterfaceRegisterCounterCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// RegisterUniqueCounter mocks base method. -func (m *MockUsageTrackerInterface) RegisterUniqueCounter(arg0 string) usage_metrics.UniqueCounter { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterUniqueCounter", arg0) - ret0, _ := ret[0].(usage_metrics.UniqueCounter) - return ret0 -} - -// RegisterUniqueCounter indicates an expected call of RegisterUniqueCounter. -func (mr *MockUsageTrackerInterfaceMockRecorder) RegisterUniqueCounter(arg0 any) *UsageTrackerInterfaceRegisterUniqueCounterCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterUniqueCounter", reflect.TypeOf((*MockUsageTrackerInterface)(nil).RegisterUniqueCounter), arg0) - return &UsageTrackerInterfaceRegisterUniqueCounterCall{Call: call} -} - -// UsageTrackerInterfaceRegisterUniqueCounterCall wrap *gomock.Call -type UsageTrackerInterfaceRegisterUniqueCounterCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *UsageTrackerInterfaceRegisterUniqueCounterCall) Return(arg0 usage_metrics.UniqueCounter) *UsageTrackerInterfaceRegisterUniqueCounterCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *UsageTrackerInterfaceRegisterUniqueCounterCall) Do(f func(string) usage_metrics.UniqueCounter) *UsageTrackerInterfaceRegisterUniqueCounterCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *UsageTrackerInterfaceRegisterUniqueCounterCall) DoAndReturn(f func(string) usage_metrics.UniqueCounter) *UsageTrackerInterfaceRegisterUniqueCounterCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// Subtract mocks base method. -func (m *MockUsageTrackerInterface) Subtract(arg0 *usage_metrics.UsageData) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Subtract", arg0) -} - -// Subtract indicates an expected call of Subtract. -func (mr *MockUsageTrackerInterfaceMockRecorder) Subtract(arg0 any) *UsageTrackerInterfaceSubtractCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subtract", reflect.TypeOf((*MockUsageTrackerInterface)(nil).Subtract), arg0) - return &UsageTrackerInterfaceSubtractCall{Call: call} -} - -// UsageTrackerInterfaceSubtractCall wrap *gomock.Call -type UsageTrackerInterfaceSubtractCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *UsageTrackerInterfaceSubtractCall) Return() *UsageTrackerInterfaceSubtractCall { - c.Call = c.Call.Return() - return c -} - -// Do rewrite *gomock.Call.Do -func (c *UsageTrackerInterfaceSubtractCall) Do(f func(*usage_metrics.UsageData)) *UsageTrackerInterfaceSubtractCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *UsageTrackerInterfaceSubtractCall) DoAndReturn(f func(*usage_metrics.UsageData)) *UsageTrackerInterfaceSubtractCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockCounter is a mock of Counter interface. -type MockCounter struct { - ctrl *gomock.Controller - recorder *MockCounterMockRecorder -} - -// MockCounterMockRecorder is the mock recorder for MockCounter. -type MockCounterMockRecorder struct { - mock *MockCounter -} - -// NewMockCounter creates a new mock instance. -func NewMockCounter(ctrl *gomock.Controller) *MockCounter { - mock := &MockCounter{ctrl: ctrl} - mock.recorder = &MockCounterMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCounter) EXPECT() *MockCounterMockRecorder { - return m.recorder -} - -// Inc mocks base method. -func (m *MockCounter) Inc() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Inc") -} - -// Inc indicates an expected call of Inc. -func (mr *MockCounterMockRecorder) Inc() *CounterIncCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockCounter)(nil).Inc)) - return &CounterIncCall{Call: call} -} - -// CounterIncCall wrap *gomock.Call -type CounterIncCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *CounterIncCall) Return() *CounterIncCall { - c.Call = c.Call.Return() - return c -} - -// Do rewrite *gomock.Call.Do -func (c *CounterIncCall) Do(f func()) *CounterIncCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *CounterIncCall) DoAndReturn(f func()) *CounterIncCall { - c.Call = c.Call.DoAndReturn(f) - return c -} - -// MockUniqueCounter is a mock of UniqueCounter interface. -type MockUniqueCounter struct { - ctrl *gomock.Controller - recorder *MockUniqueCounterMockRecorder -} - -// MockUniqueCounterMockRecorder is the mock recorder for MockUniqueCounter. -type MockUniqueCounterMockRecorder struct { - mock *MockUniqueCounter -} - -// NewMockUniqueCounter creates a new mock instance. -func NewMockUniqueCounter(ctrl *gomock.Controller) *MockUniqueCounter { - mock := &MockUniqueCounter{ctrl: ctrl} - mock.recorder = &MockUniqueCounterMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockUniqueCounter) EXPECT() *MockUniqueCounterMockRecorder { - return m.recorder -} - -// Add mocks base method. -func (m *MockUniqueCounter) Add(arg0 int64) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Add", arg0) -} - -// Add indicates an expected call of Add. -func (mr *MockUniqueCounterMockRecorder) Add(arg0 any) *UniqueCounterAddCall { - mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockUniqueCounter)(nil).Add), arg0) - return &UniqueCounterAddCall{Call: call} -} - -// UniqueCounterAddCall wrap *gomock.Call -type UniqueCounterAddCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *UniqueCounterAddCall) Return() *UniqueCounterAddCall { - c.Call = c.Call.Return() - return c -} - -// Do rewrite *gomock.Call.Do -func (c *UniqueCounterAddCall) Do(f func(int64)) *UniqueCounterAddCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *UniqueCounterAddCall) DoAndReturn(f func(int64)) *UniqueCounterAddCall { - c.Call = c.Call.DoAndReturn(f) - return c -} diff --git a/internal/tool/testing/mock_usage_metrics/doc.go b/internal/tool/testing/mock_usage_metrics/doc.go deleted file mode 100644 index 11ec0448..00000000 --- a/internal/tool/testing/mock_usage_metrics/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -package mock_usage_metrics - -//go:generate mockgen.sh -destination "api.go" "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/usage_metrics" "UsageTrackerInterface,Counter,UniqueCounter"