1
0
mirror of https://github.com/rancher/steve.git synced 2025-08-22 16:16:49 +00:00
steve/pkg/stores/sqlpartition/partition_mocks_test.go
Swastik Gour e17ca28461
Bumped dependencies to be compatible with k8s-v1.33 (#681)
Signed-off-by: swastik959 <Sswastik959@gmail.com>
2025-06-20 17:53:42 +05:30

194 lines
7.6 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/rancher/steve/pkg/stores/sqlpartition (interfaces: Partitioner,UnstructuredStore)
//
// Generated by this command:
//
// mockgen --build_flags=--mod=mod -package sqlpartition -destination partition_mocks_test.go github.com/rancher/steve/pkg/stores/sqlpartition Partitioner,UnstructuredStore
//
// Package sqlpartition is a generated GoMock package.
package sqlpartition
import (
reflect "reflect"
types "github.com/rancher/apiserver/pkg/types"
partition "github.com/rancher/steve/pkg/sqlcache/partition"
gomock "go.uber.org/mock/gomock"
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
watch "k8s.io/apimachinery/pkg/watch"
)
// MockPartitioner is a mock of Partitioner interface.
type MockPartitioner struct {
ctrl *gomock.Controller
recorder *MockPartitionerMockRecorder
isgomock struct{}
}
// MockPartitionerMockRecorder is the mock recorder for MockPartitioner.
type MockPartitionerMockRecorder struct {
mock *MockPartitioner
}
// NewMockPartitioner creates a new mock instance.
func NewMockPartitioner(ctrl *gomock.Controller) *MockPartitioner {
mock := &MockPartitioner{ctrl: ctrl}
mock.recorder = &MockPartitionerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPartitioner) EXPECT() *MockPartitionerMockRecorder {
return m.recorder
}
// All mocks base method.
func (m *MockPartitioner) All(apiOp *types.APIRequest, schema *types.APISchema, verb, id string) ([]partition.Partition, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "All", apiOp, schema, verb, id)
ret0, _ := ret[0].([]partition.Partition)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// All indicates an expected call of All.
func (mr *MockPartitionerMockRecorder) All(apiOp, schema, verb, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPartitioner)(nil).All), apiOp, schema, verb, id)
}
// Store mocks base method.
func (m *MockPartitioner) Store() UnstructuredStore {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store")
ret0, _ := ret[0].(UnstructuredStore)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockPartitionerMockRecorder) Store() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockPartitioner)(nil).Store))
}
// MockUnstructuredStore is a mock of UnstructuredStore interface.
type MockUnstructuredStore struct {
ctrl *gomock.Controller
recorder *MockUnstructuredStoreMockRecorder
isgomock struct{}
}
// MockUnstructuredStoreMockRecorder is the mock recorder for MockUnstructuredStore.
type MockUnstructuredStoreMockRecorder struct {
mock *MockUnstructuredStore
}
// NewMockUnstructuredStore creates a new mock instance.
func NewMockUnstructuredStore(ctrl *gomock.Controller) *MockUnstructuredStore {
mock := &MockUnstructuredStore{ctrl: ctrl}
mock.recorder = &MockUnstructuredStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUnstructuredStore) EXPECT() *MockUnstructuredStoreMockRecorder {
return m.recorder
}
// ByID mocks base method.
func (m *MockUnstructuredStore) ByID(apiOp *types.APIRequest, schema *types.APISchema, id string) (*unstructured.Unstructured, []types.Warning, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByID", apiOp, schema, id)
ret0, _ := ret[0].(*unstructured.Unstructured)
ret1, _ := ret[1].([]types.Warning)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// ByID indicates an expected call of ByID.
func (mr *MockUnstructuredStoreMockRecorder) ByID(apiOp, schema, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByID", reflect.TypeOf((*MockUnstructuredStore)(nil).ByID), apiOp, schema, id)
}
// Create mocks base method.
func (m *MockUnstructuredStore) Create(apiOp *types.APIRequest, schema *types.APISchema, data types.APIObject) (*unstructured.Unstructured, []types.Warning, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", apiOp, schema, data)
ret0, _ := ret[0].(*unstructured.Unstructured)
ret1, _ := ret[1].([]types.Warning)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Create indicates an expected call of Create.
func (mr *MockUnstructuredStoreMockRecorder) Create(apiOp, schema, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUnstructuredStore)(nil).Create), apiOp, schema, data)
}
// Delete mocks base method.
func (m *MockUnstructuredStore) Delete(apiOp *types.APIRequest, schema *types.APISchema, id string) (*unstructured.Unstructured, []types.Warning, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", apiOp, schema, id)
ret0, _ := ret[0].(*unstructured.Unstructured)
ret1, _ := ret[1].([]types.Warning)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Delete indicates an expected call of Delete.
func (mr *MockUnstructuredStoreMockRecorder) Delete(apiOp, schema, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUnstructuredStore)(nil).Delete), apiOp, schema, id)
}
// ListByPartitions mocks base method.
func (m *MockUnstructuredStore) ListByPartitions(apiOp *types.APIRequest, schema *types.APISchema, partitions []partition.Partition) (*unstructured.UnstructuredList, int, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListByPartitions", apiOp, schema, partitions)
ret0, _ := ret[0].(*unstructured.UnstructuredList)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].(string)
ret3, _ := ret[3].(error)
return ret0, ret1, ret2, ret3
}
// ListByPartitions indicates an expected call of ListByPartitions.
func (mr *MockUnstructuredStoreMockRecorder) ListByPartitions(apiOp, schema, partitions any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByPartitions", reflect.TypeOf((*MockUnstructuredStore)(nil).ListByPartitions), apiOp, schema, partitions)
}
// Update mocks base method.
func (m *MockUnstructuredStore) Update(apiOp *types.APIRequest, schema *types.APISchema, data types.APIObject, id string) (*unstructured.Unstructured, []types.Warning, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", apiOp, schema, data, id)
ret0, _ := ret[0].(*unstructured.Unstructured)
ret1, _ := ret[1].([]types.Warning)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Update indicates an expected call of Update.
func (mr *MockUnstructuredStoreMockRecorder) Update(apiOp, schema, data, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUnstructuredStore)(nil).Update), apiOp, schema, data, id)
}
// WatchByPartitions mocks base method.
func (m *MockUnstructuredStore) WatchByPartitions(apiOp *types.APIRequest, schema *types.APISchema, wr types.WatchRequest, partitions []partition.Partition) (chan watch.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WatchByPartitions", apiOp, schema, wr, partitions)
ret0, _ := ret[0].(chan watch.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// WatchByPartitions indicates an expected call of WatchByPartitions.
func (mr *MockUnstructuredStoreMockRecorder) WatchByPartitions(apiOp, schema, wr, partitions any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchByPartitions", reflect.TypeOf((*MockUnstructuredStore)(nil).WatchByPartitions), apiOp, schema, wr, partitions)
}