GitLabgitlab-org
cli
main
1// Code generated by MockGen. DO NOT EDIT.
2// Source: gitlab.com/gitlab-org/cli/internal/cmdutils (interfaces: Executor)
3//
4// Generated by this command:
5//
6// mockgen -typed -destination=./executor_mocks.go -package=cmdtest gitlab.com/gitlab-org/cli/internal/cmdutils Executor
7//
9// Package cmdtest is a generated GoMock package.
10package cmdtest
12import (
13 context "context"
14 io "io"
15 reflect "reflect"
17 gomock "go.uber.org/mock/gomock"
18)
20// MockExecutor is a mock of Executor interface.
21type MockExecutor struct {
22 ctrl *gomock.Controller
23 recorder *MockExecutorMockRecorder
24 isgomock struct{}
25}
27// MockExecutorMockRecorder is the mock recorder for MockExecutor.
28type MockExecutorMockRecorder struct {
29 mock *MockExecutor
30}
32// NewMockExecutor creates a new mock instance.
33func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor {
34 mock := &MockExecutor{ctrl: ctrl}
35 mock.recorder = &MockExecutorMockRecorder{mock}
36 return mock
37}
39// EXPECT returns an object that allows the caller to indicate expected use.
40func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder {
41 return m.recorder
42}
44// Exec mocks base method.
45func (m *MockExecutor) Exec(ctx context.Context, name string, args, env []string) error {
46 m.ctrl.T.Helper()
47 ret := m.ctrl.Call(m, "Exec", ctx, name, args, env)
48 ret0, _ := ret[0].(error)
49 return ret0
50}
52// Exec indicates an expected call of Exec.
53func (mr *MockExecutorMockRecorder) Exec(ctx, name, args, env any) *MockExecutorExecCall {
54 mr.mock.ctrl.T.Helper()
55 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), ctx, name, args, env)
56 return &MockExecutorExecCall{Call: call}
57}
59// MockExecutorExecCall wrap *gomock.Call
60type MockExecutorExecCall struct {
61 *gomock.Call
62}
64// Return rewrite *gomock.Call.Return
65func (c *MockExecutorExecCall) Return(arg0 error) *MockExecutorExecCall {
66 c.Call = c.Call.Return(arg0)
67 return c
68}
70// Do rewrite *gomock.Call.Do
71func (c *MockExecutorExecCall) Do(f func(context.Context, string, []string, []string) error) *MockExecutorExecCall {
72 c.Call = c.Call.Do(f)
73 return c
74}
76// DoAndReturn rewrite *gomock.Call.DoAndReturn
77func (c *MockExecutorExecCall) DoAndReturn(f func(context.Context, string, []string, []string) error) *MockExecutorExecCall {
78 c.Call = c.Call.DoAndReturn(f)
79 return c
80}
82// ExecWithCombinedOutput mocks base method.
83func (m *MockExecutor) ExecWithCombinedOutput(ctx context.Context, name string, args, env []string) ([]byte, error) {
84 m.ctrl.T.Helper()
85 ret := m.ctrl.Call(m, "ExecWithCombinedOutput", ctx, name, args, env)
86 ret0, _ := ret[0].([]byte)
87 ret1, _ := ret[1].(error)
88 return ret0, ret1
89}
91// ExecWithCombinedOutput indicates an expected call of ExecWithCombinedOutput.
92func (mr *MockExecutorMockRecorder) ExecWithCombinedOutput(ctx, name, args, env any) *MockExecutorExecWithCombinedOutputCall {
93 mr.mock.ctrl.T.Helper()
94 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecWithCombinedOutput", reflect.TypeOf((*MockExecutor)(nil).ExecWithCombinedOutput), ctx, name, args, env)
95 return &MockExecutorExecWithCombinedOutputCall{Call: call}
96}
98// MockExecutorExecWithCombinedOutputCall wrap *gomock.Call
99type MockExecutorExecWithCombinedOutputCall struct {
100 *gomock.Call
101}
103// Return rewrite *gomock.Call.Return
104func (c *MockExecutorExecWithCombinedOutputCall) Return(arg0 []byte, arg1 error) *MockExecutorExecWithCombinedOutputCall {
105 c.Call = c.Call.Return(arg0, arg1)
106 return c
107}
109// Do rewrite *gomock.Call.Do
110func (c *MockExecutorExecWithCombinedOutputCall) Do(f func(context.Context, string, []string, []string) ([]byte, error)) *MockExecutorExecWithCombinedOutputCall {
111 c.Call = c.Call.Do(f)
112 return c
113}
115// DoAndReturn rewrite *gomock.Call.DoAndReturn
116func (c *MockExecutorExecWithCombinedOutputCall) DoAndReturn(f func(context.Context, string, []string, []string) ([]byte, error)) *MockExecutorExecWithCombinedOutputCall {
117 c.Call = c.Call.DoAndReturn(f)
118 return c
119}
121// ExecWithIO mocks base method.
122func (m *MockExecutor) ExecWithIO(ctx context.Context, name string, args, env []string, stdin io.Reader, stdout, stderr io.Writer) error {
123 m.ctrl.T.Helper()
124 ret := m.ctrl.Call(m, "ExecWithIO", ctx, name, args, env, stdin, stdout, stderr)
125 ret0, _ := ret[0].(error)
126 return ret0
127}
129// ExecWithIO indicates an expected call of ExecWithIO.
130func (mr *MockExecutorMockRecorder) ExecWithIO(ctx, name, args, env, stdin, stdout, stderr any) *MockExecutorExecWithIOCall {
131 mr.mock.ctrl.T.Helper()
132 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecWithIO", reflect.TypeOf((*MockExecutor)(nil).ExecWithIO), ctx, name, args, env, stdin, stdout, stderr)
133 return &MockExecutorExecWithIOCall{Call: call}
134}
136// MockExecutorExecWithIOCall wrap *gomock.Call
137type MockExecutorExecWithIOCall struct {
138 *gomock.Call
139}
141// Return rewrite *gomock.Call.Return
142func (c *MockExecutorExecWithIOCall) Return(arg0 error) *MockExecutorExecWithIOCall {
143 c.Call = c.Call.Return(arg0)
144 return c
145}
147// Do rewrite *gomock.Call.Do
148func (c *MockExecutorExecWithIOCall) Do(f func(context.Context, string, []string, []string, io.Reader, io.Writer, io.Writer) error) *MockExecutorExecWithIOCall {
149 c.Call = c.Call.Do(f)
150 return c
151}
153// DoAndReturn rewrite *gomock.Call.DoAndReturn
154func (c *MockExecutorExecWithIOCall) DoAndReturn(f func(context.Context, string, []string, []string, io.Reader, io.Writer, io.Writer) error) *MockExecutorExecWithIOCall {
155 c.Call = c.Call.DoAndReturn(f)
156 return c
157}
159// LookPath mocks base method.
160func (m *MockExecutor) LookPath(file string) (string, error) {
161 m.ctrl.T.Helper()
162 ret := m.ctrl.Call(m, "LookPath", file)
163 ret0, _ := ret[0].(string)
164 ret1, _ := ret[1].(error)
165 return ret0, ret1
166}
168// LookPath indicates an expected call of LookPath.
169func (mr *MockExecutorMockRecorder) LookPath(file any) *MockExecutorLookPathCall {
170 mr.mock.ctrl.T.Helper()
171 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookPath", reflect.TypeOf((*MockExecutor)(nil).LookPath), file)
172 return &MockExecutorLookPathCall{Call: call}
173}
175// MockExecutorLookPathCall wrap *gomock.Call
176type MockExecutorLookPathCall struct {
177 *gomock.Call
178}
180// Return rewrite *gomock.Call.Return
181func (c *MockExecutorLookPathCall) Return(arg0 string, arg1 error) *MockExecutorLookPathCall {
182 c.Call = c.Call.Return(arg0, arg1)
183 return c
184}
186// Do rewrite *gomock.Call.Do
187func (c *MockExecutorLookPathCall) Do(f func(string) (string, error)) *MockExecutorLookPathCall {
188 c.Call = c.Call.Do(f)
189 return c
190}
192// DoAndReturn rewrite *gomock.Call.DoAndReturn
193func (c *MockExecutorLookPathCall) DoAndReturn(f func(string) (string, error)) *MockExecutorLookPathCall {
194 c.Call = c.Call.DoAndReturn(f)
195 return c
196}
Diagnostics7 git calls · 28 ms
CallStatusSizeTime028 ms
discover200185 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 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 · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=59849 git.response.cache=HIT git.response.duration_ms=3 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
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit2 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=4273 git.response.cache=HIT git.response.duration_ms=2 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:0 · deepen 1020032 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=32926 git.response.cache=HIT git.response.duration_ms=3 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=44Open pack map
fetchtree:0200233 B · hit2 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=233 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=be3b2f46264fd78e3aeec243c47ee7f44f4b940d 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=233 git.pkt.payload.max=206 git.sideband.band1.bytes=206 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=206 git.pack.trailer=60d385382f0daa4bf5b182241b9c3f6f6404da58Open pack map
fetchtree:0200425 B · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=19 git.response.bytes=425 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=a60e63d01319c0073dd508088207ea8a30fdb705 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=425 git.pkt.payload.max=398 git.sideband.band1.bytes=398 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=398 git.pack.trailer=a85ea41c4277ec613536d00d6cd4a6b2898770d0Open pack map
fetch2001.2 KiB · hit19 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=1275 git.response.cache=HIT git.response.duration_ms=19 git.fetch.wants=5c293ccf43dd42c68d8dfe6584caf1e2bd2af6de 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=1275 git.pkt.payload.max=1248 git.sideband.band1.bytes=1248 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
- a5e1887f3a975e37
- Request
- a9a86eea…
- 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