File: mock_rpc_for_test.go

package info (click to toggle)
gitlab-agent 16.1.3-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 6,324 kB
  • sloc: makefile: 175; sh: 52; ruby: 3
file content (181 lines) | stat: -rw-r--r-- 6,971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/flux/rpc (interfaces: GitLabFluxClient,GitLabFlux_ReconcileProjectsClient)

// Package agent is a generated GoMock package.
package agent

import (
	context "context"
	reflect "reflect"

	gomock "github.com/golang/mock/gomock"
	rpc "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/flux/rpc"
	grpc "google.golang.org/grpc"
	metadata "google.golang.org/grpc/metadata"
)

// MockGitLabFluxClient is a mock of GitLabFluxClient interface.
type MockGitLabFluxClient struct {
	ctrl     *gomock.Controller
	recorder *MockGitLabFluxClientMockRecorder
}

// MockGitLabFluxClientMockRecorder is the mock recorder for MockGitLabFluxClient.
type MockGitLabFluxClientMockRecorder struct {
	mock *MockGitLabFluxClient
}

// NewMockGitLabFluxClient creates a new mock instance.
func NewMockGitLabFluxClient(ctrl *gomock.Controller) *MockGitLabFluxClient {
	mock := &MockGitLabFluxClient{ctrl: ctrl}
	mock.recorder = &MockGitLabFluxClientMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGitLabFluxClient) EXPECT() *MockGitLabFluxClientMockRecorder {
	return m.recorder
}

// ReconcileProjects mocks base method.
func (m *MockGitLabFluxClient) ReconcileProjects(arg0 context.Context, arg1 *rpc.ReconcileProjectsRequest, arg2 ...grpc.CallOption) (rpc.GitLabFlux_ReconcileProjectsClient, error) {
	m.ctrl.T.Helper()
	varargs := []interface{}{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "ReconcileProjects", varargs...)
	ret0, _ := ret[0].(rpc.GitLabFlux_ReconcileProjectsClient)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ReconcileProjects indicates an expected call of ReconcileProjects.
func (mr *MockGitLabFluxClientMockRecorder) ReconcileProjects(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]interface{}{arg0, arg1}, arg2...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileProjects", reflect.TypeOf((*MockGitLabFluxClient)(nil).ReconcileProjects), varargs...)
}

// MockGitLabFlux_ReconcileProjectsClient is a mock of GitLabFlux_ReconcileProjectsClient interface.
type MockGitLabFlux_ReconcileProjectsClient struct {
	ctrl     *gomock.Controller
	recorder *MockGitLabFlux_ReconcileProjectsClientMockRecorder
}

// MockGitLabFlux_ReconcileProjectsClientMockRecorder is the mock recorder for MockGitLabFlux_ReconcileProjectsClient.
type MockGitLabFlux_ReconcileProjectsClientMockRecorder struct {
	mock *MockGitLabFlux_ReconcileProjectsClient
}

// NewMockGitLabFlux_ReconcileProjectsClient creates a new mock instance.
func NewMockGitLabFlux_ReconcileProjectsClient(ctrl *gomock.Controller) *MockGitLabFlux_ReconcileProjectsClient {
	mock := &MockGitLabFlux_ReconcileProjectsClient{ctrl: ctrl}
	mock.recorder = &MockGitLabFlux_ReconcileProjectsClientMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGitLabFlux_ReconcileProjectsClient) EXPECT() *MockGitLabFlux_ReconcileProjectsClientMockRecorder {
	return m.recorder
}

// CloseSend mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) CloseSend() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).CloseSend))
}

// Context mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) Context() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).Context))
}

// Header mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) Header() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).Header))
}

// Recv mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) Recv() (*rpc.ReconcileProjectsResponse, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Recv")
	ret0, _ := ret[0].(*rpc.ReconcileProjectsResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Recv indicates an expected call of Recv.
func (mr *MockGitLabFlux_ReconcileProjectsClientMockRecorder) Recv() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).Recv))
}

// RecvMsg mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) RecvMsg(arg0 interface{}) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).RecvMsg), arg0)
}

// SendMsg mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) SendMsg(arg0 interface{}) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).SendMsg), arg0)
}

// Trailer mocks base method.
func (m *MockGitLabFlux_ReconcileProjectsClient) 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 *MockGitLabFlux_ReconcileProjectsClientMockRecorder) Trailer() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockGitLabFlux_ReconcileProjectsClient)(nil).Trailer))
}