GitLabgitlab-org

cli

main
ply9 git calls397 ms100 KiB7 cachedprotocol v2
663 lines21 KiBRaw
1// Code generated by MockGen. DO NOT EDIT.
2// Source: gitlab.com/gitlab-org/cli/internal/commands/cluster/agent/bootstrap (interfaces: API,FluxWrapper,KubectlWrapper,Cmd)
3//
4// Generated by this command:
5//
6// mockgen -typed -destination=./mocks_for_test.go -package=bootstrap gitlab.com/gitlab-org/cli/internal/commands/cluster/agent/bootstrap API,FluxWrapper,KubectlWrapper,Cmd
7//
9// Package bootstrap is a generated GoMock package.
10package bootstrap
12import (
13 reflect "reflect"
15 gitlab "gitlab.com/gitlab-org/api/client-go/v3"
16 gomock "go.uber.org/mock/gomock"
19// MockAPI is a mock of API interface.
20type MockAPI struct {
21 ctrl *gomock.Controller
22 recorder *MockAPIMockRecorder
23 isgomock struct{}
26// MockAPIMockRecorder is the mock recorder for MockAPI.
27type MockAPIMockRecorder struct {
28 mock *MockAPI
31// NewMockAPI creates a new mock instance.
32func NewMockAPI(ctrl *gomock.Controller) *MockAPI {
33 mock := &MockAPI{ctrl: ctrl}
34 mock.recorder = &MockAPIMockRecorder{mock}
35 return mock
38// EXPECT returns an object that allows the caller to indicate expected use.
39func (m *MockAPI) EXPECT() *MockAPIMockRecorder {
40 return m.recorder
43// ConfigureAgent mocks base method.
44func (m *MockAPI) ConfigureAgent(agent *gitlab.Agent, branch string) error {
45 m.ctrl.T.Helper()
46 ret := m.ctrl.Call(m, "ConfigureAgent", agent, branch)
47 ret0, _ := ret[0].(error)
48 return ret0
51// ConfigureAgent indicates an expected call of ConfigureAgent.
52func (mr *MockAPIMockRecorder) ConfigureAgent(agent, branch any) *MockAPIConfigureAgentCall {
53 mr.mock.ctrl.T.Helper()
54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigureAgent", reflect.TypeOf((*MockAPI)(nil).ConfigureAgent), agent, branch)
55 return &MockAPIConfigureAgentCall{Call: call}
58// MockAPIConfigureAgentCall wrap *gomock.Call
59type MockAPIConfigureAgentCall struct {
60 *gomock.Call
63// Return rewrite *gomock.Call.Return
64func (c *MockAPIConfigureAgentCall) Return(arg0 error) *MockAPIConfigureAgentCall {
65 c.Call = c.Call.Return(arg0)
66 return c
69// Do rewrite *gomock.Call.Do
70func (c *MockAPIConfigureAgentCall) Do(f func(*gitlab.Agent, string) error) *MockAPIConfigureAgentCall {
71 c.Call = c.Call.Do(f)
72 return c
75// DoAndReturn rewrite *gomock.Call.DoAndReturn
76func (c *MockAPIConfigureAgentCall) DoAndReturn(f func(*gitlab.Agent, string) error) *MockAPIConfigureAgentCall {
77 c.Call = c.Call.DoAndReturn(f)
78 return c
81// ConfigureEnvironment mocks base method.
82func (m *MockAPI) ConfigureEnvironment(agentID int64, name, kubernetesNamespace, fluxResourcePath string) error {
83 m.ctrl.T.Helper()
84 ret := m.ctrl.Call(m, "ConfigureEnvironment", agentID, name, kubernetesNamespace, fluxResourcePath)
85 ret0, _ := ret[0].(error)
86 return ret0
89// ConfigureEnvironment indicates an expected call of ConfigureEnvironment.
90func (mr *MockAPIMockRecorder) ConfigureEnvironment(agentID, name, kubernetesNamespace, fluxResourcePath any) *MockAPIConfigureEnvironmentCall {
91 mr.mock.ctrl.T.Helper()
92 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigureEnvironment", reflect.TypeOf((*MockAPI)(nil).ConfigureEnvironment), agentID, name, kubernetesNamespace, fluxResourcePath)
93 return &MockAPIConfigureEnvironmentCall{Call: call}
96// MockAPIConfigureEnvironmentCall wrap *gomock.Call
97type MockAPIConfigureEnvironmentCall struct {
98 *gomock.Call
101// Return rewrite *gomock.Call.Return
102func (c *MockAPIConfigureEnvironmentCall) Return(arg0 error) *MockAPIConfigureEnvironmentCall {
103 c.Call = c.Call.Return(arg0)
104 return c
107// Do rewrite *gomock.Call.Do
108func (c *MockAPIConfigureEnvironmentCall) Do(f func(int64, string, string, string) error) *MockAPIConfigureEnvironmentCall {
109 c.Call = c.Call.Do(f)
110 return c
113// DoAndReturn rewrite *gomock.Call.DoAndReturn
114func (c *MockAPIConfigureEnvironmentCall) DoAndReturn(f func(int64, string, string, string) error) *MockAPIConfigureEnvironmentCall {
115 c.Call = c.Call.DoAndReturn(f)
116 return c
119// CreateAgentToken mocks base method.
120func (m *MockAPI) CreateAgentToken(agentID int64) (*gitlab.AgentToken, error) {
121 m.ctrl.T.Helper()
122 ret := m.ctrl.Call(m, "CreateAgentToken", agentID)
123 ret0, _ := ret[0].(*gitlab.AgentToken)
124 ret1, _ := ret[1].(error)
125 return ret0, ret1
128// CreateAgentToken indicates an expected call of CreateAgentToken.
129func (mr *MockAPIMockRecorder) CreateAgentToken(agentID any) *MockAPICreateAgentTokenCall {
130 mr.mock.ctrl.T.Helper()
131 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAgentToken", reflect.TypeOf((*MockAPI)(nil).CreateAgentToken), agentID)
132 return &MockAPICreateAgentTokenCall{Call: call}
135// MockAPICreateAgentTokenCall wrap *gomock.Call
136type MockAPICreateAgentTokenCall struct {
137 *gomock.Call
140// Return rewrite *gomock.Call.Return
141func (c *MockAPICreateAgentTokenCall) Return(arg0 *gitlab.AgentToken, arg1 error) *MockAPICreateAgentTokenCall {
142 c.Call = c.Call.Return(arg0, arg1)
143 return c
146// Do rewrite *gomock.Call.Do
147func (c *MockAPICreateAgentTokenCall) Do(f func(int64) (*gitlab.AgentToken, error)) *MockAPICreateAgentTokenCall {
148 c.Call = c.Call.Do(f)
149 return c
152// DoAndReturn rewrite *gomock.Call.DoAndReturn
153func (c *MockAPICreateAgentTokenCall) DoAndReturn(f func(int64) (*gitlab.AgentToken, error)) *MockAPICreateAgentTokenCall {
154 c.Call = c.Call.DoAndReturn(f)
155 return c
158// GetAgentByName mocks base method.
159func (m *MockAPI) GetAgentByName(name string) (*gitlab.Agent, error) {
160 m.ctrl.T.Helper()
161 ret := m.ctrl.Call(m, "GetAgentByName", name)
162 ret0, _ := ret[0].(*gitlab.Agent)
163 ret1, _ := ret[1].(error)
164 return ret0, ret1
167// GetAgentByName indicates an expected call of GetAgentByName.
168func (mr *MockAPIMockRecorder) GetAgentByName(name any) *MockAPIGetAgentByNameCall {
169 mr.mock.ctrl.T.Helper()
170 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAgentByName", reflect.TypeOf((*MockAPI)(nil).GetAgentByName), name)
171 return &MockAPIGetAgentByNameCall{Call: call}
174// MockAPIGetAgentByNameCall wrap *gomock.Call
175type MockAPIGetAgentByNameCall struct {
176 *gomock.Call
179// Return rewrite *gomock.Call.Return
180func (c *MockAPIGetAgentByNameCall) Return(arg0 *gitlab.Agent, arg1 error) *MockAPIGetAgentByNameCall {
181 c.Call = c.Call.Return(arg0, arg1)
182 return c
185// Do rewrite *gomock.Call.Do
186func (c *MockAPIGetAgentByNameCall) Do(f func(string) (*gitlab.Agent, error)) *MockAPIGetAgentByNameCall {
187 c.Call = c.Call.Do(f)
188 return c
191// DoAndReturn rewrite *gomock.Call.DoAndReturn
192func (c *MockAPIGetAgentByNameCall) DoAndReturn(f func(string) (*gitlab.Agent, error)) *MockAPIGetAgentByNameCall {
193 c.Call = c.Call.DoAndReturn(f)
194 return c
197// GetDefaultBranch mocks base method.
198func (m *MockAPI) GetDefaultBranch() (string, error) {
199 m.ctrl.T.Helper()
200 ret := m.ctrl.Call(m, "GetDefaultBranch")
201 ret0, _ := ret[0].(string)
202 ret1, _ := ret[1].(error)
203 return ret0, ret1
206// GetDefaultBranch indicates an expected call of GetDefaultBranch.
207func (mr *MockAPIMockRecorder) GetDefaultBranch() *MockAPIGetDefaultBranchCall {
208 mr.mock.ctrl.T.Helper()
209 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDefaultBranch", reflect.TypeOf((*MockAPI)(nil).GetDefaultBranch))
210 return &MockAPIGetDefaultBranchCall{Call: call}
213// MockAPIGetDefaultBranchCall wrap *gomock.Call
214type MockAPIGetDefaultBranchCall struct {
215 *gomock.Call
218// Return rewrite *gomock.Call.Return
219func (c *MockAPIGetDefaultBranchCall) Return(arg0 string, arg1 error) *MockAPIGetDefaultBranchCall {
220 c.Call = c.Call.Return(arg0, arg1)
221 return c
224// Do rewrite *gomock.Call.Do
225func (c *MockAPIGetDefaultBranchCall) Do(f func() (string, error)) *MockAPIGetDefaultBranchCall {
226 c.Call = c.Call.Do(f)
227 return c
230// DoAndReturn rewrite *gomock.Call.DoAndReturn
231func (c *MockAPIGetDefaultBranchCall) DoAndReturn(f func() (string, error)) *MockAPIGetDefaultBranchCall {
232 c.Call = c.Call.DoAndReturn(f)
233 return c
236// GetKASAddress mocks base method.
237func (m *MockAPI) GetKASAddress() (string, error) {
238 m.ctrl.T.Helper()
239 ret := m.ctrl.Call(m, "GetKASAddress")
240 ret0, _ := ret[0].(string)
241 ret1, _ := ret[1].(error)
242 return ret0, ret1
245// GetKASAddress indicates an expected call of GetKASAddress.
246func (mr *MockAPIMockRecorder) GetKASAddress() *MockAPIGetKASAddressCall {
247 mr.mock.ctrl.T.Helper()
248 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKASAddress", reflect.TypeOf((*MockAPI)(nil).GetKASAddress))
249 return &MockAPIGetKASAddressCall{Call: call}
252// MockAPIGetKASAddressCall wrap *gomock.Call
253type MockAPIGetKASAddressCall struct {
254 *gomock.Call
257// Return rewrite *gomock.Call.Return
258func (c *MockAPIGetKASAddressCall) Return(arg0 string, arg1 error) *MockAPIGetKASAddressCall {
259 c.Call = c.Call.Return(arg0, arg1)
260 return c
263// Do rewrite *gomock.Call.Do
264func (c *MockAPIGetKASAddressCall) Do(f func() (string, error)) *MockAPIGetKASAddressCall {
265 c.Call = c.Call.Do(f)
266 return c
269// DoAndReturn rewrite *gomock.Call.DoAndReturn
270func (c *MockAPIGetKASAddressCall) DoAndReturn(f func() (string, error)) *MockAPIGetKASAddressCall {
271 c.Call = c.Call.DoAndReturn(f)
272 return c
275// RegisterAgent mocks base method.
276func (m *MockAPI) RegisterAgent(name string) (*gitlab.Agent, error) {
277 m.ctrl.T.Helper()
278 ret := m.ctrl.Call(m, "RegisterAgent", name)
279 ret0, _ := ret[0].(*gitlab.Agent)
280 ret1, _ := ret[1].(error)
281 return ret0, ret1
284// RegisterAgent indicates an expected call of RegisterAgent.
285func (mr *MockAPIMockRecorder) RegisterAgent(name any) *MockAPIRegisterAgentCall {
286 mr.mock.ctrl.T.Helper()
287 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterAgent", reflect.TypeOf((*MockAPI)(nil).RegisterAgent), name)
288 return &MockAPIRegisterAgentCall{Call: call}
291// MockAPIRegisterAgentCall wrap *gomock.Call
292type MockAPIRegisterAgentCall struct {
293 *gomock.Call
296// Return rewrite *gomock.Call.Return
297func (c *MockAPIRegisterAgentCall) Return(arg0 *gitlab.Agent, arg1 error) *MockAPIRegisterAgentCall {
298 c.Call = c.Call.Return(arg0, arg1)
299 return c
302// Do rewrite *gomock.Call.Do
303func (c *MockAPIRegisterAgentCall) Do(f func(string) (*gitlab.Agent, error)) *MockAPIRegisterAgentCall {
304 c.Call = c.Call.Do(f)
305 return c
308// DoAndReturn rewrite *gomock.Call.DoAndReturn
309func (c *MockAPIRegisterAgentCall) DoAndReturn(f func(string) (*gitlab.Agent, error)) *MockAPIRegisterAgentCall {
310 c.Call = c.Call.DoAndReturn(f)
311 return c
314// SyncFile mocks base method.
315func (m *MockAPI) SyncFile(f file, branch string) error {
316 m.ctrl.T.Helper()
317 ret := m.ctrl.Call(m, "SyncFile", f, branch)
318 ret0, _ := ret[0].(error)
319 return ret0
322// SyncFile indicates an expected call of SyncFile.
323func (mr *MockAPIMockRecorder) SyncFile(f, branch any) *MockAPISyncFileCall {
324 mr.mock.ctrl.T.Helper()
325 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncFile", reflect.TypeOf((*MockAPI)(nil).SyncFile), f, branch)
326 return &MockAPISyncFileCall{Call: call}
329// MockAPISyncFileCall wrap *gomock.Call
330type MockAPISyncFileCall struct {
331 *gomock.Call
334// Return rewrite *gomock.Call.Return
335func (c *MockAPISyncFileCall) Return(arg0 error) *MockAPISyncFileCall {
336 c.Call = c.Call.Return(arg0)
337 return c
340// Do rewrite *gomock.Call.Do
341func (c *MockAPISyncFileCall) Do(f func(file, string) error) *MockAPISyncFileCall {
342 c.Call = c.Call.Do(f)
343 return c
346// DoAndReturn rewrite *gomock.Call.DoAndReturn
347func (c *MockAPISyncFileCall) DoAndReturn(f func(file, string) error) *MockAPISyncFileCall {
348 c.Call = c.Call.DoAndReturn(f)
349 return c
352// MockFluxWrapper is a mock of FluxWrapper interface.
353type MockFluxWrapper struct {
354 ctrl *gomock.Controller
355 recorder *MockFluxWrapperMockRecorder
356 isgomock struct{}
359// MockFluxWrapperMockRecorder is the mock recorder for MockFluxWrapper.
360type MockFluxWrapperMockRecorder struct {
361 mock *MockFluxWrapper
364// NewMockFluxWrapper creates a new mock instance.
365func NewMockFluxWrapper(ctrl *gomock.Controller) *MockFluxWrapper {
366 mock := &MockFluxWrapper{ctrl: ctrl}
367 mock.recorder = &MockFluxWrapperMockRecorder{mock}
368 return mock
371// EXPECT returns an object that allows the caller to indicate expected use.
372func (m *MockFluxWrapper) EXPECT() *MockFluxWrapperMockRecorder {
373 return m.recorder
376// createHelmReleaseManifest mocks base method.
377func (m *MockFluxWrapper) createHelmReleaseManifest(kasAddress string) (file, error) {
378 m.ctrl.T.Helper()
379 ret := m.ctrl.Call(m, "createHelmReleaseManifest", kasAddress)
380 ret0, _ := ret[0].(file)
381 ret1, _ := ret[1].(error)
382 return ret0, ret1
385// createHelmReleaseManifest indicates an expected call of createHelmReleaseManifest.
386func (mr *MockFluxWrapperMockRecorder) createHelmReleaseManifest(kasAddress any) *MockFluxWrappercreateHelmReleaseManifestCall {
387 mr.mock.ctrl.T.Helper()
388 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createHelmReleaseManifest", reflect.TypeOf((*MockFluxWrapper)(nil).createHelmReleaseManifest), kasAddress)
389 return &MockFluxWrappercreateHelmReleaseManifestCall{Call: call}
392// MockFluxWrappercreateHelmReleaseManifestCall wrap *gomock.Call
393type MockFluxWrappercreateHelmReleaseManifestCall struct {
394 *gomock.Call
397// Return rewrite *gomock.Call.Return
398func (c *MockFluxWrappercreateHelmReleaseManifestCall) Return(arg0 file, arg1 error) *MockFluxWrappercreateHelmReleaseManifestCall {
399 c.Call = c.Call.Return(arg0, arg1)
400 return c
403// Do rewrite *gomock.Call.Do
404func (c *MockFluxWrappercreateHelmReleaseManifestCall) Do(f func(string) (file, error)) *MockFluxWrappercreateHelmReleaseManifestCall {
405 c.Call = c.Call.Do(f)
406 return c
409// DoAndReturn rewrite *gomock.Call.DoAndReturn
410func (c *MockFluxWrappercreateHelmReleaseManifestCall) DoAndReturn(f func(string) (file, error)) *MockFluxWrappercreateHelmReleaseManifestCall {
411 c.Call = c.Call.DoAndReturn(f)
412 return c
415// createHelmRepositoryManifest mocks base method.
416func (m *MockFluxWrapper) createHelmRepositoryManifest() (file, error) {
417 m.ctrl.T.Helper()
418 ret := m.ctrl.Call(m, "createHelmRepositoryManifest")
419 ret0, _ := ret[0].(file)
420 ret1, _ := ret[1].(error)
421 return ret0, ret1
424// createHelmRepositoryManifest indicates an expected call of createHelmRepositoryManifest.
425func (mr *MockFluxWrapperMockRecorder) createHelmRepositoryManifest() *MockFluxWrappercreateHelmRepositoryManifestCall {
426 mr.mock.ctrl.T.Helper()
427 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createHelmRepositoryManifest", reflect.TypeOf((*MockFluxWrapper)(nil).createHelmRepositoryManifest))
428 return &MockFluxWrappercreateHelmRepositoryManifestCall{Call: call}
431// MockFluxWrappercreateHelmRepositoryManifestCall wrap *gomock.Call
432type MockFluxWrappercreateHelmRepositoryManifestCall struct {
433 *gomock.Call
436// Return rewrite *gomock.Call.Return
437func (c *MockFluxWrappercreateHelmRepositoryManifestCall) Return(arg0 file, arg1 error) *MockFluxWrappercreateHelmRepositoryManifestCall {
438 c.Call = c.Call.Return(arg0, arg1)
439 return c
442// Do rewrite *gomock.Call.Do
443func (c *MockFluxWrappercreateHelmRepositoryManifestCall) Do(f func() (file, error)) *MockFluxWrappercreateHelmRepositoryManifestCall {
444 c.Call = c.Call.Do(f)
445 return c
448// DoAndReturn rewrite *gomock.Call.DoAndReturn
449func (c *MockFluxWrappercreateHelmRepositoryManifestCall) DoAndReturn(f func() (file, error)) *MockFluxWrappercreateHelmRepositoryManifestCall {
450 c.Call = c.Call.DoAndReturn(f)
451 return c
454// reconcile mocks base method.
455func (m *MockFluxWrapper) reconcile() error {
456 m.ctrl.T.Helper()
457 ret := m.ctrl.Call(m, "reconcile")
458 ret0, _ := ret[0].(error)
459 return ret0
462// reconcile indicates an expected call of reconcile.
463func (mr *MockFluxWrapperMockRecorder) reconcile() *MockFluxWrapperreconcileCall {
464 mr.mock.ctrl.T.Helper()
465 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "reconcile", reflect.TypeOf((*MockFluxWrapper)(nil).reconcile))
466 return &MockFluxWrapperreconcileCall{Call: call}
469// MockFluxWrapperreconcileCall wrap *gomock.Call
470type MockFluxWrapperreconcileCall struct {
471 *gomock.Call
474// Return rewrite *gomock.Call.Return
475func (c *MockFluxWrapperreconcileCall) Return(arg0 error) *MockFluxWrapperreconcileCall {
476 c.Call = c.Call.Return(arg0)
477 return c
480// Do rewrite *gomock.Call.Do
481func (c *MockFluxWrapperreconcileCall) Do(f func() error) *MockFluxWrapperreconcileCall {
482 c.Call = c.Call.Do(f)
483 return c
486// DoAndReturn rewrite *gomock.Call.DoAndReturn
487func (c *MockFluxWrapperreconcileCall) DoAndReturn(f func() error) *MockFluxWrapperreconcileCall {
488 c.Call = c.Call.DoAndReturn(f)
489 return c
492// MockKubectlWrapper is a mock of KubectlWrapper interface.
493type MockKubectlWrapper struct {
494 ctrl *gomock.Controller
495 recorder *MockKubectlWrapperMockRecorder
496 isgomock struct{}
499// MockKubectlWrapperMockRecorder is the mock recorder for MockKubectlWrapper.
500type MockKubectlWrapperMockRecorder struct {
501 mock *MockKubectlWrapper
504// NewMockKubectlWrapper creates a new mock instance.
505func NewMockKubectlWrapper(ctrl *gomock.Controller) *MockKubectlWrapper {
506 mock := &MockKubectlWrapper{ctrl: ctrl}
507 mock.recorder = &MockKubectlWrapperMockRecorder{mock}
508 return mock
511// EXPECT returns an object that allows the caller to indicate expected use.
512func (m *MockKubectlWrapper) EXPECT() *MockKubectlWrapperMockRecorder {
513 return m.recorder
516// createAgentTokenSecret mocks base method.
517func (m *MockKubectlWrapper) createAgentTokenSecret(tokenID int64, token string) error {
518 m.ctrl.T.Helper()
519 ret := m.ctrl.Call(m, "createAgentTokenSecret", tokenID, token)
520 ret0, _ := ret[0].(error)
521 return ret0
524// createAgentTokenSecret indicates an expected call of createAgentTokenSecret.
525func (mr *MockKubectlWrapperMockRecorder) createAgentTokenSecret(tokenID, token any) *MockKubectlWrappercreateAgentTokenSecretCall {
526 mr.mock.ctrl.T.Helper()
527 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createAgentTokenSecret", reflect.TypeOf((*MockKubectlWrapper)(nil).createAgentTokenSecret), tokenID, token)
528 return &MockKubectlWrappercreateAgentTokenSecretCall{Call: call}
531// MockKubectlWrappercreateAgentTokenSecretCall wrap *gomock.Call
532type MockKubectlWrappercreateAgentTokenSecretCall struct {
533 *gomock.Call
536// Return rewrite *gomock.Call.Return
537func (c *MockKubectlWrappercreateAgentTokenSecretCall) Return(arg0 error) *MockKubectlWrappercreateAgentTokenSecretCall {
538 c.Call = c.Call.Return(arg0)
539 return c
542// Do rewrite *gomock.Call.Do
543func (c *MockKubectlWrappercreateAgentTokenSecretCall) Do(f func(int64, string) error) *MockKubectlWrappercreateAgentTokenSecretCall {
544 c.Call = c.Call.Do(f)
545 return c
548// DoAndReturn rewrite *gomock.Call.DoAndReturn
549func (c *MockKubectlWrappercreateAgentTokenSecretCall) DoAndReturn(f func(int64, string) error) *MockKubectlWrappercreateAgentTokenSecretCall {
550 c.Call = c.Call.DoAndReturn(f)
551 return c
554// MockCmd is a mock of Cmd interface.
555type MockCmd struct {
556 ctrl *gomock.Controller
557 recorder *MockCmdMockRecorder
558 isgomock struct{}
561// MockCmdMockRecorder is the mock recorder for MockCmd.
562type MockCmdMockRecorder struct {
563 mock *MockCmd
566// NewMockCmd creates a new mock instance.
567func NewMockCmd(ctrl *gomock.Controller) *MockCmd {
568 mock := &MockCmd{ctrl: ctrl}
569 mock.recorder = &MockCmdMockRecorder{mock}
570 return mock
573// EXPECT returns an object that allows the caller to indicate expected use.
574func (m *MockCmd) EXPECT() *MockCmdMockRecorder {
575 return m.recorder
578// Run mocks base method.
579func (m *MockCmd) Run(name string, arg ...string) error {
580 m.ctrl.T.Helper()
581 varargs := []any{name}
582 for _, a := range arg {
583 varargs = append(varargs, a)
584 }
585 ret := m.ctrl.Call(m, "Run", varargs...)
586 ret0, _ := ret[0].(error)
587 return ret0
590// Run indicates an expected call of Run.
591func (mr *MockCmdMockRecorder) Run(name any, arg ...any) *MockCmdRunCall {
592 mr.mock.ctrl.T.Helper()
593 varargs := append([]any{name}, arg...)
594 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockCmd)(nil).Run), varargs...)
595 return &MockCmdRunCall{Call: call}
598// MockCmdRunCall wrap *gomock.Call
599type MockCmdRunCall struct {
600 *gomock.Call
603// Return rewrite *gomock.Call.Return
604func (c *MockCmdRunCall) Return(arg0 error) *MockCmdRunCall {
605 c.Call = c.Call.Return(arg0)
606 return c
609// Do rewrite *gomock.Call.Do
610func (c *MockCmdRunCall) Do(f func(string, ...string) error) *MockCmdRunCall {
611 c.Call = c.Call.Do(f)
612 return c
615// DoAndReturn rewrite *gomock.Call.DoAndReturn
616func (c *MockCmdRunCall) DoAndReturn(f func(string, ...string) error) *MockCmdRunCall {
617 c.Call = c.Call.DoAndReturn(f)
618 return c
621// RunWithOutput mocks base method.
622func (m *MockCmd) RunWithOutput(name string, arg ...string) ([]byte, error) {
623 m.ctrl.T.Helper()
624 varargs := []any{name}
625 for _, a := range arg {
626 varargs = append(varargs, a)
627 }
628 ret := m.ctrl.Call(m, "RunWithOutput", varargs...)
629 ret0, _ := ret[0].([]byte)
630 ret1, _ := ret[1].(error)
631 return ret0, ret1
634// RunWithOutput indicates an expected call of RunWithOutput.
635func (mr *MockCmdMockRecorder) RunWithOutput(name any, arg ...any) *MockCmdRunWithOutputCall {
636 mr.mock.ctrl.T.Helper()
637 varargs := append([]any{name}, arg...)
638 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunWithOutput", reflect.TypeOf((*MockCmd)(nil).RunWithOutput), varargs...)
639 return &MockCmdRunWithOutputCall{Call: call}
642// MockCmdRunWithOutputCall wrap *gomock.Call
643type MockCmdRunWithOutputCall struct {
644 *gomock.Call
647// Return rewrite *gomock.Call.Return
648func (c *MockCmdRunWithOutputCall) Return(arg0 []byte, arg1 error) *MockCmdRunWithOutputCall {
649 c.Call = c.Call.Return(arg0, arg1)
650 return c
653// Do rewrite *gomock.Call.Do
654func (c *MockCmdRunWithOutputCall) Do(f func(string, ...string) ([]byte, error)) *MockCmdRunWithOutputCall {
655 c.Call = c.Call.Do(f)
656 return c
659// DoAndReturn rewrite *gomock.Call.DoAndReturn
660func (c *MockCmdRunWithOutputCall) DoAndReturn(f func(string, ...string) ([]byte, error)) *MockCmdRunWithOutputCall {
661 c.Call = c.Call.DoAndReturn(f)
662 return c
Diagnostics9 git calls · 397 ms
CallStatusSizeTime0397 ms
discover200185 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=185
git.server.agent=git/2.56.g1891de4-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=185
git.pkt.payload.max=35
ls-refs20058 KiB · hit1 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=1
git.response.bytes=59849
git.response.cache=HIT
git.response.duration_ms=1
git.protocol.version=2
git.pkt.frames=731
git.pkt.data=730
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=59849
git.pkt.payload.max=143
git.ls_refs.count=730
git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 1020032 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=5
git.response.bytes=32926
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=22
git.pkt.data=20
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=32926
git.pkt.payload.max=32046
git.sideband.band1.bytes=32046
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=80
git.pack.bytes=32046
git.pack.ofs_delta=36
git.pack.ref_delta=0
git.pack.chain.max=2
git.pack.trailer=cb0bad5d7ffc514895d8b21c4dd470327f90bc91
git.pack.full=44
Open pack map
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit5 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=4273
git.response.cache=HIT
git.response.duration_ms=5
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=4273
git.pkt.payload.max=4173
git.sideband.band1.bytes=4173
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=11
git.pack.bytes=4173
git.fetch.wide.objects=11
git.fetch.wide.extra_bytes=3930
git.fetch.wide.blobs=0
fetchtree:02001.8 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=1857
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=dce174ff8c632a19d17eea99c8a9b7c37fb2b592
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1857
git.pkt.payload.max=1830
git.sideband.band1.bytes=1830
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=1830
git.pack.trailer=fb03183b7909876778f740d196d7516811003517
Open pack map
fetchtree:0200200 B · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=200
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=9988d47506dcbe3004b8b72cbdb9d66d6d75cda4
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=200
git.pkt.payload.max=173
git.sideband.band1.bytes=173
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=173
git.pack.trailer=948ee807a1ee817af67f2df94421a202e82325f9
Open pack map
fetchtree:0200405 B · hit1 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=4
git.response.bytes=405
git.response.cache=HIT
git.response.duration_ms=1
git.fetch.filter=tree:0
git.fetch.wants=d271680e941992259de0ff84d4a04bcbba55f531
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=405
git.pkt.payload.max=378
git.sideband.band1.bytes=378
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=378
git.pack.trailer=adfacba5ff1f4fcf28dcaac12e2874f6d48a7934
Open pack map
fetchtree:0200414 B · hit4 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=380
git.response.bytes=414
git.response.cache=HIT
git.response.duration_ms=4
git.fetch.filter=tree:0
git.fetch.wants=3c487cc16dcfeca6d024165580948fbb3a622e23
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=414
git.pkt.payload.max=387
git.sideband.band1.bytes=387
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=387
git.pack.trailer=a621ec095c3ac7a33563831f77c04827c9c343d3
Open pack map
fetch2002.6 KiB380 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=2702
git.response.cache=MISS
git.response.duration_ms=380
git.fetch.wants=2ec88cb85012e91edd05495a0baeb0471fe1e62e
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2702
git.pkt.payload.max=2675
git.sideband.band1.bytes=2675
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://gitlab.com/gitlab-org/cli
Ref
refs/heads/main
Commit
0dd7574dce9e385c5c30540e6c15657adc6bdce9
cf-ray
a5eb08c0ecf721ca
Request
3c7975ac…
Protocol
v2 · sha1
Agent
git/2.56.g1891de4-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format