v3.0.0 f19f453

mock_volume_service.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"github.com/bnema/gordon/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockVolumeService creates a new instance of MockVolumeService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockVolumeService(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockVolumeService {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockVolumeService{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MockVolumeService is an autogenerated mock type for the VolumeService type
38type MockVolumeService struct {
39	mock.Mock
40}
41
42type MockVolumeService_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockVolumeService) EXPECT() *MockVolumeService_Expecter {
47	return &MockVolumeService_Expecter{mock: &_m.Mock}
48}
49
50// ListVolumes provides a mock function for the type MockVolumeService
51func (_mock *MockVolumeService) ListVolumes(ctx context.Context) ([]*domain.VolumeInfo, error) {
52	ret := _mock.Called(ctx)
53
54	if len(ret) == 0 {
55		panic("no return value specified for ListVolumes")
56	}
57
58	var r0 []*domain.VolumeInfo
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*domain.VolumeInfo, error)); ok {
61		return returnFunc(ctx)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context) []*domain.VolumeInfo); ok {
64		r0 = returnFunc(ctx)
65	} else {
66		if ret.Get(0) != nil {
67			r0 = ret.Get(0).([]*domain.VolumeInfo)
68		}
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71		r1 = returnFunc(ctx)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// MockVolumeService_ListVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVolumes'
79type MockVolumeService_ListVolumes_Call struct {
80	*mock.Call
81}
82
83// ListVolumes is a helper method to define mock.On call
84//   - ctx context.Context
85func (_e *MockVolumeService_Expecter) ListVolumes(ctx any) *MockVolumeService_ListVolumes_Call {
86	return &MockVolumeService_ListVolumes_Call{Call: _e.mock.On("ListVolumes", ctx)}
87}
88
89func (_c *MockVolumeService_ListVolumes_Call) Run(run func(ctx context.Context)) *MockVolumeService_ListVolumes_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *MockVolumeService_ListVolumes_Call) Return(volumeInfos []*domain.VolumeInfo, err error) *MockVolumeService_ListVolumes_Call {
103	_c.Call.Return(volumeInfos, err)
104	return _c
105}
106
107func (_c *MockVolumeService_ListVolumes_Call) RunAndReturn(run func(ctx context.Context) ([]*domain.VolumeInfo, error)) *MockVolumeService_ListVolumes_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// PruneVolumes provides a mock function for the type MockVolumeService
113func (_mock *MockVolumeService) PruneVolumes(ctx context.Context, dryRun bool) (*domain.VolumePruneReport, []*domain.VolumeInfo, error) {
114	ret := _mock.Called(ctx, dryRun)
115
116	if len(ret) == 0 {
117		panic("no return value specified for PruneVolumes")
118	}
119
120	var r0 *domain.VolumePruneReport
121	var r1 []*domain.VolumeInfo
122	var r2 error
123	if returnFunc, ok := ret.Get(0).(func(context.Context, bool) (*domain.VolumePruneReport, []*domain.VolumeInfo, error)); ok {
124		return returnFunc(ctx, dryRun)
125	}
126	if returnFunc, ok := ret.Get(0).(func(context.Context, bool) *domain.VolumePruneReport); ok {
127		r0 = returnFunc(ctx, dryRun)
128	} else {
129		if ret.Get(0) != nil {
130			r0 = ret.Get(0).(*domain.VolumePruneReport)
131		}
132	}
133	if returnFunc, ok := ret.Get(1).(func(context.Context, bool) []*domain.VolumeInfo); ok {
134		r1 = returnFunc(ctx, dryRun)
135	} else {
136		if ret.Get(1) != nil {
137			r1 = ret.Get(1).([]*domain.VolumeInfo)
138		}
139	}
140	if returnFunc, ok := ret.Get(2).(func(context.Context, bool) error); ok {
141		r2 = returnFunc(ctx, dryRun)
142	} else {
143		r2 = ret.Error(2)
144	}
145	return r0, r1, r2
146}
147
148// MockVolumeService_PruneVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneVolumes'
149type MockVolumeService_PruneVolumes_Call struct {
150	*mock.Call
151}
152
153// PruneVolumes is a helper method to define mock.On call
154//   - ctx context.Context
155//   - dryRun bool
156func (_e *MockVolumeService_Expecter) PruneVolumes(ctx any, dryRun any) *MockVolumeService_PruneVolumes_Call {
157	return &MockVolumeService_PruneVolumes_Call{Call: _e.mock.On("PruneVolumes", ctx, dryRun)}
158}
159
160func (_c *MockVolumeService_PruneVolumes_Call) Run(run func(ctx context.Context, dryRun bool)) *MockVolumeService_PruneVolumes_Call {
161	_c.Call.Run(func(args mock.Arguments) {
162		var arg0 context.Context
163		if args[0] != nil {
164			arg0 = args[0].(context.Context)
165		}
166		var arg1 bool
167		if args[1] != nil {
168			arg1 = args[1].(bool)
169		}
170		run(
171			arg0,
172			arg1,
173		)
174	})
175	return _c
176}
177
178func (_c *MockVolumeService_PruneVolumes_Call) Return(volumePruneReport *domain.VolumePruneReport, volumeInfos []*domain.VolumeInfo, err error) *MockVolumeService_PruneVolumes_Call {
179	_c.Call.Return(volumePruneReport, volumeInfos, err)
180	return _c
181}
182
183func (_c *MockVolumeService_PruneVolumes_Call) RunAndReturn(run func(ctx context.Context, dryRun bool) (*domain.VolumePruneReport, []*domain.VolumeInfo, error)) *MockVolumeService_PruneVolumes_Call {
184	_c.Call.Return(run)
185	return _c
186}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close