1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/pkg/apihelper/mock_APIHelpers.go
Markus Lehtonen ac3030ce48 Re-generate files
Refresh auto-generated files using the new conainerized approach.
2022-08-10 09:47:23 +03:00

189 lines
4.4 KiB
Go

// Code generated by mockery v2.13.0. DO NOT EDIT.
package apihelper
import (
mock "github.com/stretchr/testify/mock"
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/api/core/v1"
versioned "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
)
// MockAPIHelpers is an autogenerated mock type for the APIHelpers type
type MockAPIHelpers struct {
mock.Mock
}
// GetClient provides a mock function with given fields:
func (_m *MockAPIHelpers) GetClient() (*kubernetes.Clientset, error) {
ret := _m.Called()
var r0 *kubernetes.Clientset
if rf, ok := ret.Get(0).(func() *kubernetes.Clientset); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*kubernetes.Clientset)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetNode provides a mock function with given fields: _a0, _a1
func (_m *MockAPIHelpers) GetNode(_a0 *kubernetes.Clientset, _a1 string) (*v1.Node, error) {
ret := _m.Called(_a0, _a1)
var r0 *v1.Node
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string) *v1.Node); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Node)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset, string) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetNodes provides a mock function with given fields: _a0
func (_m *MockAPIHelpers) GetNodes(_a0 *kubernetes.Clientset) (*v1.NodeList, error) {
ret := _m.Called(_a0)
var r0 *v1.NodeList
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset) *v1.NodeList); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.NodeList)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetPod provides a mock function with given fields: _a0, _a1, _a2
func (_m *MockAPIHelpers) GetPod(_a0 *kubernetes.Clientset, _a1 string, _a2 string) (*v1.Pod, error) {
ret := _m.Called(_a0, _a1, _a2)
var r0 *v1.Pod
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string, string) *v1.Pod); ok {
r0 = rf(_a0, _a1, _a2)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset, string, string) error); ok {
r1 = rf(_a0, _a1, _a2)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTopologyClient provides a mock function with given fields:
func (_m *MockAPIHelpers) GetTopologyClient() (*versioned.Clientset, error) {
ret := _m.Called()
var r0 *versioned.Clientset
if rf, ok := ret.Get(0).(func() *versioned.Clientset); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*versioned.Clientset)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PatchNode provides a mock function with given fields: _a0, _a1, _a2
func (_m *MockAPIHelpers) PatchNode(_a0 *kubernetes.Clientset, _a1 string, _a2 []JsonPatch) error {
ret := _m.Called(_a0, _a1, _a2)
var r0 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string, []JsonPatch) error); ok {
r0 = rf(_a0, _a1, _a2)
} else {
r0 = ret.Error(0)
}
return r0
}
// PatchNodeStatus provides a mock function with given fields: _a0, _a1, _a2
func (_m *MockAPIHelpers) PatchNodeStatus(_a0 *kubernetes.Clientset, _a1 string, _a2 []JsonPatch) error {
ret := _m.Called(_a0, _a1, _a2)
var r0 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string, []JsonPatch) error); ok {
r0 = rf(_a0, _a1, _a2)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateNode provides a mock function with given fields: _a0, _a1
func (_m *MockAPIHelpers) UpdateNode(_a0 *kubernetes.Clientset, _a1 *v1.Node) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, *v1.Node) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}
type NewMockAPIHelpersT interface {
mock.TestingT
Cleanup(func())
}
// NewMockAPIHelpers creates a new instance of MockAPIHelpers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockAPIHelpers(t NewMockAPIHelpersT) *MockAPIHelpers {
mock := &MockAPIHelpers{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}