/
mock_device_plugin_reconciler.go
161 lines (137 loc) · 7.17 KB
/
mock_device_plugin_reconciler.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
// Code generated by MockGen. DO NOT EDIT.
// Source: device_plugin_reconciler.go
//
// Generated by this command:
//
// mockgen -source=device_plugin_reconciler.go -package=controllers -destination=mock_device_plugin_reconciler.go daemonSetCreator
//
// Package controllers is a generated GoMock package.
package controllers
import (
context "context"
reflect "reflect"
v1beta1 "github.com/rh-ecosystem-edge/kernel-module-management/api/v1beta1"
gomock "go.uber.org/mock/gomock"
v1 "k8s.io/api/apps/v1"
)
// MockdevicePluginReconcilerHelperAPI is a mock of devicePluginReconcilerHelperAPI interface.
type MockdevicePluginReconcilerHelperAPI struct {
ctrl *gomock.Controller
recorder *MockdevicePluginReconcilerHelperAPIMockRecorder
}
// MockdevicePluginReconcilerHelperAPIMockRecorder is the mock recorder for MockdevicePluginReconcilerHelperAPI.
type MockdevicePluginReconcilerHelperAPIMockRecorder struct {
mock *MockdevicePluginReconcilerHelperAPI
}
// NewMockdevicePluginReconcilerHelperAPI creates a new mock instance.
func NewMockdevicePluginReconcilerHelperAPI(ctrl *gomock.Controller) *MockdevicePluginReconcilerHelperAPI {
mock := &MockdevicePluginReconcilerHelperAPI{ctrl: ctrl}
mock.recorder = &MockdevicePluginReconcilerHelperAPIMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockdevicePluginReconcilerHelperAPI) EXPECT() *MockdevicePluginReconcilerHelperAPIMockRecorder {
return m.recorder
}
// garbageCollect mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) garbageCollect(ctx context.Context, mod *v1beta1.Module, existingDS []v1.DaemonSet) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "garbageCollect", ctx, mod, existingDS)
ret0, _ := ret[0].(error)
return ret0
}
// garbageCollect indicates an expected call of garbageCollect.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) garbageCollect(ctx, mod, existingDS any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "garbageCollect", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).garbageCollect), ctx, mod, existingDS)
}
// getModuleDevicePluginDaemonSets mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) getModuleDevicePluginDaemonSets(ctx context.Context, name, namespace string) ([]v1.DaemonSet, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "getModuleDevicePluginDaemonSets", ctx, name, namespace)
ret0, _ := ret[0].([]v1.DaemonSet)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// getModuleDevicePluginDaemonSets indicates an expected call of getModuleDevicePluginDaemonSets.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) getModuleDevicePluginDaemonSets(ctx, name, namespace any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getModuleDevicePluginDaemonSets", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).getModuleDevicePluginDaemonSets), ctx, name, namespace)
}
// handleDevicePlugin mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) handleDevicePlugin(ctx context.Context, mod *v1beta1.Module, existingDevicePluginDS []v1.DaemonSet) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "handleDevicePlugin", ctx, mod, existingDevicePluginDS)
ret0, _ := ret[0].(error)
return ret0
}
// handleDevicePlugin indicates an expected call of handleDevicePlugin.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) handleDevicePlugin(ctx, mod, existingDevicePluginDS any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleDevicePlugin", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).handleDevicePlugin), ctx, mod, existingDevicePluginDS)
}
// handleModuleDeletion mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) handleModuleDeletion(ctx context.Context, existingDevicePluginDS []v1.DaemonSet) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "handleModuleDeletion", ctx, existingDevicePluginDS)
ret0, _ := ret[0].(error)
return ret0
}
// handleModuleDeletion indicates an expected call of handleModuleDeletion.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) handleModuleDeletion(ctx, existingDevicePluginDS any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleModuleDeletion", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).handleModuleDeletion), ctx, existingDevicePluginDS)
}
// moduleUpdateDevicePluginStatus mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) moduleUpdateDevicePluginStatus(ctx context.Context, mod *v1beta1.Module, existingDevicePluginDS []v1.DaemonSet) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "moduleUpdateDevicePluginStatus", ctx, mod, existingDevicePluginDS)
ret0, _ := ret[0].(error)
return ret0
}
// moduleUpdateDevicePluginStatus indicates an expected call of moduleUpdateDevicePluginStatus.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) moduleUpdateDevicePluginStatus(ctx, mod, existingDevicePluginDS any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "moduleUpdateDevicePluginStatus", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).moduleUpdateDevicePluginStatus), ctx, mod, existingDevicePluginDS)
}
// setKMMOMetrics mocks base method.
func (m *MockdevicePluginReconcilerHelperAPI) setKMMOMetrics(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "setKMMOMetrics", ctx)
}
// setKMMOMetrics indicates an expected call of setKMMOMetrics.
func (mr *MockdevicePluginReconcilerHelperAPIMockRecorder) setKMMOMetrics(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setKMMOMetrics", reflect.TypeOf((*MockdevicePluginReconcilerHelperAPI)(nil).setKMMOMetrics), ctx)
}
// MockdaemonSetCreator is a mock of daemonSetCreator interface.
type MockdaemonSetCreator struct {
ctrl *gomock.Controller
recorder *MockdaemonSetCreatorMockRecorder
}
// MockdaemonSetCreatorMockRecorder is the mock recorder for MockdaemonSetCreator.
type MockdaemonSetCreatorMockRecorder struct {
mock *MockdaemonSetCreator
}
// NewMockdaemonSetCreator creates a new mock instance.
func NewMockdaemonSetCreator(ctrl *gomock.Controller) *MockdaemonSetCreator {
mock := &MockdaemonSetCreator{ctrl: ctrl}
mock.recorder = &MockdaemonSetCreatorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockdaemonSetCreator) EXPECT() *MockdaemonSetCreatorMockRecorder {
return m.recorder
}
// setDevicePluginAsDesired mocks base method.
func (m *MockdaemonSetCreator) setDevicePluginAsDesired(ctx context.Context, ds *v1.DaemonSet, mod *v1beta1.Module) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "setDevicePluginAsDesired", ctx, ds, mod)
ret0, _ := ret[0].(error)
return ret0
}
// setDevicePluginAsDesired indicates an expected call of setDevicePluginAsDesired.
func (mr *MockdaemonSetCreatorMockRecorder) setDevicePluginAsDesired(ctx, ds, mod any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setDevicePluginAsDesired", reflect.TypeOf((*MockdaemonSetCreator)(nil).setDevicePluginAsDesired), ctx, ds, mod)
}