forked from estafette/estafette-gke-preemptible-killer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes_client_mock.go
151 lines (129 loc) · 6.13 KB
/
kubernetes_client_mock.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
// Code generated by MockGen. DO NOT EDIT.
// Source: kubernetes_client.go
// Package main is a generated GoMock package.
package main
import (
context "context"
gomock "github.com/golang/mock/gomock"
v1 "k8s.io/api/core/v1"
reflect "reflect"
)
// MockKubernetesClient is a mock of KubernetesClient interface
type MockKubernetesClient struct {
ctrl *gomock.Controller
recorder *MockKubernetesClientMockRecorder
}
// MockKubernetesClientMockRecorder is the mock recorder for MockKubernetesClient
type MockKubernetesClientMockRecorder struct {
mock *MockKubernetesClient
}
// NewMockKubernetesClient creates a new mock instance
func NewMockKubernetesClient(ctrl *gomock.Controller) *MockKubernetesClient {
mock := &MockKubernetesClient{ctrl: ctrl}
mock.recorder = &MockKubernetesClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockKubernetesClient) EXPECT() *MockKubernetesClientMockRecorder {
return m.recorder
}
// DrainNode mocks base method
func (m *MockKubernetesClient) DrainNode(ctx context.Context, nodeName string, drainTimeout int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DrainNode", ctx, nodeName, drainTimeout)
ret0, _ := ret[0].(error)
return ret0
}
// DrainNode indicates an expected call of DrainNode
func (mr *MockKubernetesClientMockRecorder) DrainNode(ctx, nodeName, drainTimeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainNode", reflect.TypeOf((*MockKubernetesClient)(nil).DrainNode), ctx, nodeName, drainTimeout)
}
// DrainKubeDNSFromNode mocks base method
func (m *MockKubernetesClient) DrainKubeDNSFromNode(ctx context.Context, nodeName string, drainTimeout int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DrainKubeDNSFromNode", ctx, nodeName, drainTimeout)
ret0, _ := ret[0].(error)
return ret0
}
// DrainKubeDNSFromNode indicates an expected call of DrainKubeDNSFromNode
func (mr *MockKubernetesClientMockRecorder) DrainKubeDNSFromNode(ctx, nodeName, drainTimeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainKubeDNSFromNode", reflect.TypeOf((*MockKubernetesClient)(nil).DrainKubeDNSFromNode), ctx, nodeName, drainTimeout)
}
// GetNode mocks base method
func (m *MockKubernetesClient) GetNode(ctx context.Context, nodeName string) (*v1.Node, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetNode", ctx, nodeName)
ret0, _ := ret[0].(*v1.Node)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetNode indicates an expected call of GetNode
func (mr *MockKubernetesClientMockRecorder) GetNode(ctx, nodeName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNode", reflect.TypeOf((*MockKubernetesClient)(nil).GetNode), ctx, nodeName)
}
// DeleteNode mocks base method
func (m *MockKubernetesClient) DeleteNode(ctx context.Context, nodeName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteNode", ctx, nodeName)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteNode indicates an expected call of DeleteNode
func (mr *MockKubernetesClientMockRecorder) DeleteNode(ctx, nodeName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNode", reflect.TypeOf((*MockKubernetesClient)(nil).DeleteNode), ctx, nodeName)
}
// GetPreemptibleNodes mocks base method
func (m *MockKubernetesClient) GetPreemptibleNodes(ctx context.Context, filters map[string]string) (*v1.NodeList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPreemptibleNodes", ctx, filters)
ret0, _ := ret[0].(*v1.NodeList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPreemptibleNodes indicates an expected call of GetPreemptibleNodes
func (mr *MockKubernetesClientMockRecorder) GetPreemptibleNodes(ctx, filters interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPreemptibleNodes", reflect.TypeOf((*MockKubernetesClient)(nil).GetPreemptibleNodes), ctx, filters)
}
// GetProjectIdAndZoneFromNode mocks base method
func (m *MockKubernetesClient) GetProjectIdAndZoneFromNode(ctx context.Context, nodeName string) (string, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProjectIdAndZoneFromNode", ctx, nodeName)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(string)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetProjectIdAndZoneFromNode indicates an expected call of GetProjectIdAndZoneFromNode
func (mr *MockKubernetesClientMockRecorder) GetProjectIdAndZoneFromNode(ctx, nodeName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectIdAndZoneFromNode", reflect.TypeOf((*MockKubernetesClient)(nil).GetProjectIdAndZoneFromNode), ctx, nodeName)
}
// SetNodeAnnotation mocks base method
func (m *MockKubernetesClient) SetNodeAnnotation(ctx context.Context, nodeName, key, value string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetNodeAnnotation", ctx, nodeName, key, value)
ret0, _ := ret[0].(error)
return ret0
}
// SetNodeAnnotation indicates an expected call of SetNodeAnnotation
func (mr *MockKubernetesClientMockRecorder) SetNodeAnnotation(ctx, nodeName, key, value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNodeAnnotation", reflect.TypeOf((*MockKubernetesClient)(nil).SetNodeAnnotation), ctx, nodeName, key, value)
}
// SetUnschedulableState mocks base method
func (m *MockKubernetesClient) SetUnschedulableState(ctx context.Context, nodeName string, unschedulable bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetUnschedulableState", ctx, nodeName, unschedulable)
ret0, _ := ret[0].(error)
return ret0
}
// SetUnschedulableState indicates an expected call of SetUnschedulableState
func (mr *MockKubernetesClientMockRecorder) SetUnschedulableState(ctx, nodeName, unschedulable interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnschedulableState", reflect.TypeOf((*MockKubernetesClient)(nil).SetUnschedulableState), ctx, nodeName, unschedulable)
}