forked from coder/envbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock_mounter_test.go
174 lines (148 loc) · 5.54 KB
/
mock_mounter_test.go
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
// Code generated by MockGen. DO NOT EDIT.
// Source: remount.go
//
// Generated by this command:
//
// mockgen -source=remount.go -package=ebutil -destination=mock_mounter_test.go -write_generate_directive
//
// Package ebutil is a generated GoMock package.
package ebutil
import (
os "os"
reflect "reflect"
procfs "github.com/prometheus/procfs"
gomock "go.uber.org/mock/gomock"
)
//go:generate mockgen -source=remount.go -package=ebutil -destination=mock_mounter_test.go -write_generate_directive
// Mockmounter is a mock of mounter interface.
type Mockmounter struct {
ctrl *gomock.Controller
recorder *MockmounterMockRecorder
}
// MockmounterMockRecorder is the mock recorder for Mockmounter.
type MockmounterMockRecorder struct {
mock *Mockmounter
}
// NewMockmounter creates a new mock instance.
func NewMockmounter(ctrl *gomock.Controller) *Mockmounter {
mock := &Mockmounter{ctrl: ctrl}
mock.recorder = &MockmounterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mockmounter) EXPECT() *MockmounterMockRecorder {
return m.recorder
}
// EvalSymlinks mocks base method.
func (m *Mockmounter) EvalSymlinks(arg0 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EvalSymlinks", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// EvalSymlinks indicates an expected call of EvalSymlinks.
func (mr *MockmounterMockRecorder) EvalSymlinks(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvalSymlinks", reflect.TypeOf((*Mockmounter)(nil).EvalSymlinks), arg0)
}
// GetMounts mocks base method.
func (m *Mockmounter) GetMounts() ([]*procfs.MountInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMounts")
ret0, _ := ret[0].([]*procfs.MountInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMounts indicates an expected call of GetMounts.
func (mr *MockmounterMockRecorder) GetMounts() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMounts", reflect.TypeOf((*Mockmounter)(nil).GetMounts))
}
// MkdirAll mocks base method.
func (m *Mockmounter) MkdirAll(arg0 string, arg1 os.FileMode) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MkdirAll", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// MkdirAll indicates an expected call of MkdirAll.
func (mr *MockmounterMockRecorder) MkdirAll(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MkdirAll", reflect.TypeOf((*Mockmounter)(nil).MkdirAll), arg0, arg1)
}
// Mount mocks base method.
func (m *Mockmounter) Mount(arg0, arg1, arg2 string, arg3 uintptr, arg4 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Mount", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// Mount indicates an expected call of Mount.
func (mr *MockmounterMockRecorder) Mount(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mount", reflect.TypeOf((*Mockmounter)(nil).Mount), arg0, arg1, arg2, arg3, arg4)
}
// OpenFile mocks base method.
func (m *Mockmounter) OpenFile(arg0 string, arg1 int, arg2 os.FileMode) (*os.File, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenFile", arg0, arg1, arg2)
ret0, _ := ret[0].(*os.File)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenFile indicates an expected call of OpenFile.
func (mr *MockmounterMockRecorder) OpenFile(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenFile", reflect.TypeOf((*Mockmounter)(nil).OpenFile), arg0, arg1, arg2)
}
// ReadDir mocks base method.
func (m *Mockmounter) ReadDir(arg0 string) ([]os.DirEntry, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReadDir", arg0)
ret0, _ := ret[0].([]os.DirEntry)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReadDir indicates an expected call of ReadDir.
func (mr *MockmounterMockRecorder) ReadDir(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDir", reflect.TypeOf((*Mockmounter)(nil).ReadDir), arg0)
}
// Rename mocks base method.
func (m *Mockmounter) Rename(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Rename", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Rename indicates an expected call of Rename.
func (mr *MockmounterMockRecorder) Rename(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rename", reflect.TypeOf((*Mockmounter)(nil).Rename), arg0, arg1)
}
// Stat mocks base method.
func (m *Mockmounter) Stat(arg0 string) (os.FileInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stat", arg0)
ret0, _ := ret[0].(os.FileInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Stat indicates an expected call of Stat.
func (mr *MockmounterMockRecorder) Stat(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*Mockmounter)(nil).Stat), arg0)
}
// Unmount mocks base method.
func (m *Mockmounter) Unmount(arg0 string, arg1 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unmount", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Unmount indicates an expected call of Unmount.
func (mr *MockmounterMockRecorder) Unmount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unmount", reflect.TypeOf((*Mockmounter)(nil).Unmount), arg0, arg1)
}