1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-04 17:01:16 +00:00

Migrate the mocking library to uber's (#291)

* Migrate from golang/mock to uber/mock.

* Update go.mod

* Continue migration to uber/mock.

* Tweaks from running the go.uber.mock's mockgen.
This commit is contained in:
Eric Promislow
2024-10-10 10:28:25 -07:00
committed by GitHub
parent 484ce1c9e9
commit 6a11ffb660
22 changed files with 202 additions and 160 deletions

View File

@@ -1,5 +1,10 @@
// 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
@@ -7,9 +12,9 @@ package sqlpartition
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
types "github.com/rancher/apiserver/pkg/types"
partition "github.com/rancher/lasso/pkg/cache/sql/partition"
gomock "go.uber.org/mock/gomock"
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
watch "k8s.io/apimachinery/pkg/watch"
)
@@ -47,7 +52,7 @@ func (m *MockPartitioner) All(arg0 *types.APIRequest, arg1 *types.APISchema, arg
}
// All indicates an expected call of All.
func (mr *MockPartitionerMockRecorder) All(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
func (mr *MockPartitionerMockRecorder) All(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPartitioner)(nil).All), arg0, arg1, arg2, arg3)
}
@@ -100,7 +105,7 @@ func (m *MockUnstructuredStore) ByID(arg0 *types.APIRequest, arg1 *types.APISche
}
// ByID indicates an expected call of ByID.
func (mr *MockUnstructuredStoreMockRecorder) ByID(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) ByID(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByID", reflect.TypeOf((*MockUnstructuredStore)(nil).ByID), arg0, arg1, arg2)
}
@@ -116,7 +121,7 @@ func (m *MockUnstructuredStore) Create(arg0 *types.APIRequest, arg1 *types.APISc
}
// Create indicates an expected call of Create.
func (mr *MockUnstructuredStoreMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUnstructuredStore)(nil).Create), arg0, arg1, arg2)
}
@@ -132,7 +137,7 @@ func (m *MockUnstructuredStore) Delete(arg0 *types.APIRequest, arg1 *types.APISc
}
// Delete indicates an expected call of Delete.
func (mr *MockUnstructuredStoreMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUnstructuredStore)(nil).Delete), arg0, arg1, arg2)
}
@@ -149,7 +154,7 @@ func (m *MockUnstructuredStore) ListByPartitions(arg0 *types.APIRequest, arg1 *t
}
// ListByPartitions indicates an expected call of ListByPartitions.
func (mr *MockUnstructuredStoreMockRecorder) ListByPartitions(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) ListByPartitions(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByPartitions", reflect.TypeOf((*MockUnstructuredStore)(nil).ListByPartitions), arg0, arg1, arg2)
}
@@ -165,7 +170,7 @@ func (m *MockUnstructuredStore) Update(arg0 *types.APIRequest, arg1 *types.APISc
}
// Update indicates an expected call of Update.
func (mr *MockUnstructuredStoreMockRecorder) Update(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) Update(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUnstructuredStore)(nil).Update), arg0, arg1, arg2, arg3)
}
@@ -180,7 +185,7 @@ func (m *MockUnstructuredStore) WatchByPartitions(arg0 *types.APIRequest, arg1 *
}
// WatchByPartitions indicates an expected call of WatchByPartitions.
func (mr *MockUnstructuredStoreMockRecorder) WatchByPartitions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
func (mr *MockUnstructuredStoreMockRecorder) WatchByPartitions(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchByPartitions", reflect.TypeOf((*MockUnstructuredStore)(nil).WatchByPartitions), arg0, arg1, arg2, arg3)
}