Newer
Older
// Code generated by mockery v2.20.0. DO NOT EDIT.
package mocks
import (
go_plugin "github.com/hashicorp/go-plugin"
gnmi "github.com/openconfig/gnmi/proto/gnmi"
mock "github.com/stretchr/testify/mock"
networkelement "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement"
plugin "code.fbi.h-da.de/danet/gosdn/controller/interfaces/plugin"
uuid "github.com/google/uuid"
)
// Plugin is an autogenerated mock type for the Plugin type
type Plugin struct {
mock.Mock
}
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
// Close provides a mock function with given fields:
func (_m *Plugin) Close() {
_m.Called()
}
// DeleteNode provides a mock function with given fields: path
func (_m *Plugin) DeleteNode(path *gnmi.Path) error {
ret := _m.Called(path)
var r0 error
if rf, ok := ret.Get(0).(func(*gnmi.Path) error); ok {
r0 = rf(path)
} else {
r0 = ret.Error(0)
}
return r0
}
// Diff provides a mock function with given fields: original, modified
func (_m *Plugin) Diff(original []byte, modified []byte) (*gnmi.Notification, error) {
ret := _m.Called(original, modified)
var r0 *gnmi.Notification
var r1 error
if rf, ok := ret.Get(0).(func([]byte, []byte) (*gnmi.Notification, error)); ok {
return rf(original, modified)
}
if rf, ok := ret.Get(0).(func([]byte, []byte) *gnmi.Notification); ok {
r0 = rf(original, modified)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*gnmi.Notification)
}
}
if rf, ok := ret.Get(1).(func([]byte, []byte) error); ok {
r1 = rf(original, modified)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExecPath provides a mock function with given fields:
func (_m *Plugin) ExecPath() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
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
// GetClient provides a mock function with given fields:
func (_m *Plugin) GetClient() *go_plugin.Client {
ret := _m.Called()
var r0 *go_plugin.Client
if rf, ok := ret.Get(0).(func() *go_plugin.Client); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*go_plugin.Client)
}
}
return r0
}
// GetNode provides a mock function with given fields: path
func (_m *Plugin) GetNode(path *gnmi.Path) ([]*gnmi.Notification, error) {
ret := _m.Called(path)
var r0 []*gnmi.Notification
var r1 error
if rf, ok := ret.Get(0).(func(*gnmi.Path) ([]*gnmi.Notification, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(*gnmi.Path) []*gnmi.Notification); ok {
r0 = rf(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*gnmi.Notification)
}
}
if rf, ok := ret.Get(1).(func(*gnmi.Path) error); ok {
r1 = rf(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
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
// ID provides a mock function with given fields:
func (_m *Plugin) ID() uuid.UUID {
ret := _m.Called()
var r0 uuid.UUID
if rf, ok := ret.Get(0).(func() uuid.UUID); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(uuid.UUID)
}
}
return r0
}
// Manifest provides a mock function with given fields:
func (_m *Plugin) Manifest() *plugin.Manifest {
ret := _m.Called()
var r0 *plugin.Manifest
if rf, ok := ret.Get(0).(func() *plugin.Manifest); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*plugin.Manifest)
}
}
return r0
}
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
182
183
// Model provides a mock function with given fields: filterReadOnly
func (_m *Plugin) Model(filterReadOnly bool) ([]byte, error) {
ret := _m.Called(filterReadOnly)
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(bool) ([]byte, error)); ok {
return rf(filterReadOnly)
}
if rf, ok := ret.Get(0).(func(bool) []byte); ok {
r0 = rf(filterReadOnly)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func(bool) error); ok {
r1 = rf(filterReadOnly)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Ping provides a mock function with given fields:
func (_m *Plugin) Ping() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
r0 = ret.Error(0)
}
return r0
}
// PruneConfigFalse provides a mock function with given fields: value
func (_m *Plugin) PruneConfigFalse(value []byte) ([]byte, error) {
ret := _m.Called(value)
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func([]byte) ([]byte, error)); ok {
return rf(value)
}
if rf, ok := ret.Get(0).(func([]byte) []byte); ok {
r0 = rf(value)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func([]byte) error); ok {
r1 = rf(value)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Restart provides a mock function with given fields:
func (_m *Plugin) Restart() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// SchemaTreeGzip provides a mock function with given fields:
func (_m *Plugin) SchemaTreeGzip() ([]byte, error) {
ret := _m.Called()
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func() ([]byte, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []byte); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetNode provides a mock function with given fields: path, value
func (_m *Plugin) SetNode(path *gnmi.Path, value *gnmi.TypedValue) error {
ret := _m.Called(path, value)
var r0 error
if rf, ok := ret.Get(0).(func(*gnmi.Path, *gnmi.TypedValue) error); ok {
r0 = rf(path, value)
} else {
r0 = ret.Error(0)
}
return r0
}
// State provides a mock function with given fields:
func (_m *Plugin) State() plugin.State {
ret := _m.Called()
var r0 plugin.State
if rf, ok := ret.Get(0).(func() plugin.State); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(plugin.State)
}
return r0
}
// Unmarshal provides a mock function with given fields: json, path
func (_m *Plugin) Unmarshal(json []byte, path *gnmi.Path) error {
ret := _m.Called(json, path)
var r0 error
if rf, ok := ret.Get(0).(func([]byte, *gnmi.Path) error); ok {
r0 = rf(json, path)
} else {
r0 = ret.Error(0)
}
return r0
}
// Update provides a mock function with given fields:
func (_m *Plugin) Update() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// ValidateChange provides a mock function with given fields: operation, path, value
func (_m *Plugin) ValidateChange(operation networkelement.ApiOperation, path *gnmi.Path, value []byte) ([]byte, error) {
ret := _m.Called(operation, path, value)
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(networkelement.ApiOperation, *gnmi.Path, []byte) ([]byte, error)); ok {
return rf(operation, path, value)
}
if rf, ok := ret.Get(0).(func(networkelement.ApiOperation, *gnmi.Path, []byte) []byte); ok {
r0 = rf(operation, path, value)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func(networkelement.ApiOperation, *gnmi.Path, []byte) error); ok {
r1 = rf(operation, path, value)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewPlugin interface {
mock.TestingT
Cleanup(func())
}
// NewPlugin creates a new instance of Plugin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewPlugin(t mockConstructorTestingTNewPlugin) *Plugin {
mock := &Plugin{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}