mirror of
https://github.com/rancher/steve.git
synced 2025-09-07 18:31:13 +00:00
[v0.3] Migrate the mocking library to uber's (#475)
* 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. * go generate ./... --------- Co-authored-by: Eric Promislow <epromislow@suse.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: k8s.io/client-go/dynamic (interfaces: ResourceInterface)
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen --build_flags=--mod=mod -package sqlproxy -destination ./dynamic_mocks_test.go k8s.io/client-go/dynamic ResourceInterface
|
||||
//
|
||||
|
||||
// Package sqlproxy is a generated GoMock package.
|
||||
package sqlproxy
|
||||
@@ -8,7 +13,7 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -41,7 +46,7 @@ func (m *MockResourceInterface) EXPECT() *MockResourceInterfaceMockRecorder {
|
||||
// Apply mocks base method.
|
||||
func (m *MockResourceInterface) Apply(arg0 context.Context, arg1 string, arg2 *unstructured.Unstructured, arg3 v1.ApplyOptions, arg4 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2, arg3}
|
||||
varargs := []any{arg0, arg1, arg2, arg3}
|
||||
for _, a := range arg4 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -52,9 +57,9 @@ func (m *MockResourceInterface) Apply(arg0 context.Context, arg1 string, arg2 *u
|
||||
}
|
||||
|
||||
// Apply indicates an expected call of Apply.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...)
|
||||
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResourceInterface)(nil).Apply), varargs...)
|
||||
}
|
||||
|
||||
@@ -68,7 +73,7 @@ func (m *MockResourceInterface) ApplyStatus(arg0 context.Context, arg1 string, a
|
||||
}
|
||||
|
||||
// ApplyStatus indicates an expected call of ApplyStatus.
|
||||
func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -76,7 +81,7 @@ func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3
|
||||
// Create mocks base method.
|
||||
func (m *MockResourceInterface) Create(arg0 context.Context, arg1 *unstructured.Unstructured, arg2 v1.CreateOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -87,16 +92,16 @@ func (m *MockResourceInterface) Create(arg0 context.Context, arg1 *unstructured.
|
||||
}
|
||||
|
||||
// Create indicates an expected call of Create.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockResourceInterface)(nil).Create), varargs...)
|
||||
}
|
||||
|
||||
// Delete mocks base method.
|
||||
func (m *MockResourceInterface) Delete(arg0 context.Context, arg1 string, arg2 v1.DeleteOptions, arg3 ...string) error {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -106,9 +111,9 @@ func (m *MockResourceInterface) Delete(arg0 context.Context, arg1 string, arg2 v
|
||||
}
|
||||
|
||||
// Delete indicates an expected call of Delete.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResourceInterface)(nil).Delete), varargs...)
|
||||
}
|
||||
|
||||
@@ -121,7 +126,7 @@ func (m *MockResourceInterface) DeleteCollection(arg0 context.Context, arg1 v1.D
|
||||
}
|
||||
|
||||
// DeleteCollection indicates an expected call of DeleteCollection.
|
||||
func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2)
|
||||
}
|
||||
@@ -129,7 +134,7 @@ func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 i
|
||||
// Get mocks base method.
|
||||
func (m *MockResourceInterface) Get(arg0 context.Context, arg1 string, arg2 v1.GetOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -140,9 +145,9 @@ func (m *MockResourceInterface) Get(arg0 context.Context, arg1 string, arg2 v1.G
|
||||
}
|
||||
|
||||
// Get indicates an expected call of Get.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResourceInterface)(nil).Get), varargs...)
|
||||
}
|
||||
|
||||
@@ -156,7 +161,7 @@ func (m *MockResourceInterface) List(arg0 context.Context, arg1 v1.ListOptions)
|
||||
}
|
||||
|
||||
// List indicates an expected call of List.
|
||||
func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockResourceInterface)(nil).List), arg0, arg1)
|
||||
}
|
||||
@@ -164,7 +169,7 @@ func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 interface{}) *gomoc
|
||||
// Patch mocks base method.
|
||||
func (m *MockResourceInterface) Patch(arg0 context.Context, arg1 string, arg2 types.PatchType, arg3 []byte, arg4 v1.PatchOptions, arg5 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2, arg3, arg4}
|
||||
varargs := []any{arg0, arg1, arg2, arg3, arg4}
|
||||
for _, a := range arg5 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -175,16 +180,16 @@ func (m *MockResourceInterface) Patch(arg0 context.Context, arg1 string, arg2 ty
|
||||
}
|
||||
|
||||
// Patch indicates an expected call of Patch.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 interface{}, arg5 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2, arg3, arg4}, arg5...)
|
||||
varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockResourceInterface)(nil).Patch), varargs...)
|
||||
}
|
||||
|
||||
// Update mocks base method.
|
||||
func (m *MockResourceInterface) Update(arg0 context.Context, arg1 *unstructured.Unstructured, arg2 v1.UpdateOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -195,9 +200,9 @@ func (m *MockResourceInterface) Update(arg0 context.Context, arg1 *unstructured.
|
||||
}
|
||||
|
||||
// Update indicates an expected call of Update.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockResourceInterface)(nil).Update), varargs...)
|
||||
}
|
||||
|
||||
@@ -211,7 +216,7 @@ func (m *MockResourceInterface) UpdateStatus(arg0 context.Context, arg1 *unstruc
|
||||
}
|
||||
|
||||
// UpdateStatus indicates an expected call of UpdateStatus.
|
||||
func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2)
|
||||
}
|
||||
@@ -226,7 +231,7 @@ func (m *MockResourceInterface) Watch(arg0 context.Context, arg1 v1.ListOptions)
|
||||
}
|
||||
|
||||
// Watch indicates an expected call of Watch.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockResourceInterface)(nil).Watch), arg0, arg1)
|
||||
}
|
||||
|
@@ -1,5 +1,10 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/rancher/steve/pkg/stores/sqlproxy (interfaces: Cache,ClientGetter,CacheFactory,SchemaColumnSetter,RelationshipNotifier,TransformBuilder)
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen --build_flags=--mod=mod -package sqlproxy -destination ./proxy_mocks_test.go github.com/rancher/steve/pkg/stores/sqlproxy Cache,ClientGetter,CacheFactory,SchemaColumnSetter,RelationshipNotifier,TransformBuilder
|
||||
//
|
||||
|
||||
// Package sqlproxy is a generated GoMock package.
|
||||
package sqlproxy
|
||||
@@ -8,12 +13,12 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
types "github.com/rancher/apiserver/pkg/types"
|
||||
informer "github.com/rancher/lasso/pkg/cache/sql/informer"
|
||||
factory "github.com/rancher/lasso/pkg/cache/sql/informer/factory"
|
||||
partition "github.com/rancher/lasso/pkg/cache/sql/partition"
|
||||
summary "github.com/rancher/wrangler/v3/pkg/summary"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
dynamic "k8s.io/client-go/dynamic"
|
||||
@@ -57,7 +62,7 @@ func (m *MockCache) ListByOptions(arg0 context.Context, arg1 informer.ListOption
|
||||
}
|
||||
|
||||
// ListByOptions indicates an expected call of ListByOptions.
|
||||
func (mr *MockCacheMockRecorder) ListByOptions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockCacheMockRecorder) ListByOptions(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByOptions", reflect.TypeOf((*MockCache)(nil).ListByOptions), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -95,7 +100,7 @@ func (m *MockClientGetter) AdminClient(arg0 *types.APIRequest, arg1 *types.APISc
|
||||
}
|
||||
|
||||
// AdminClient indicates an expected call of AdminClient.
|
||||
func (mr *MockClientGetterMockRecorder) AdminClient(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) AdminClient(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminClient", reflect.TypeOf((*MockClientGetter)(nil).AdminClient), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -125,7 +130,7 @@ func (m *MockClientGetter) Client(arg0 *types.APIRequest, arg1 *types.APISchema,
|
||||
}
|
||||
|
||||
// Client indicates an expected call of Client.
|
||||
func (mr *MockClientGetterMockRecorder) Client(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) Client(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockClientGetter)(nil).Client), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -140,7 +145,7 @@ func (m *MockClientGetter) DynamicClient(arg0 *types.APIRequest, arg1 rest.Warni
|
||||
}
|
||||
|
||||
// DynamicClient indicates an expected call of DynamicClient.
|
||||
func (mr *MockClientGetterMockRecorder) DynamicClient(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) DynamicClient(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DynamicClient", reflect.TypeOf((*MockClientGetter)(nil).DynamicClient), arg0, arg1)
|
||||
}
|
||||
@@ -169,7 +174,7 @@ func (m *MockClientGetter) K8sInterface(arg0 *types.APIRequest) (kubernetes.Inte
|
||||
}
|
||||
|
||||
// K8sInterface indicates an expected call of K8sInterface.
|
||||
func (mr *MockClientGetterMockRecorder) K8sInterface(arg0 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) K8sInterface(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "K8sInterface", reflect.TypeOf((*MockClientGetter)(nil).K8sInterface), arg0)
|
||||
}
|
||||
@@ -184,7 +189,7 @@ func (m *MockClientGetter) TableAdminClient(arg0 *types.APIRequest, arg1 *types.
|
||||
}
|
||||
|
||||
// TableAdminClient indicates an expected call of TableAdminClient.
|
||||
func (mr *MockClientGetterMockRecorder) TableAdminClient(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) TableAdminClient(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableAdminClient", reflect.TypeOf((*MockClientGetter)(nil).TableAdminClient), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -199,7 +204,7 @@ func (m *MockClientGetter) TableAdminClientForWatch(arg0 *types.APIRequest, arg1
|
||||
}
|
||||
|
||||
// TableAdminClientForWatch indicates an expected call of TableAdminClientForWatch.
|
||||
func (mr *MockClientGetterMockRecorder) TableAdminClientForWatch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) TableAdminClientForWatch(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableAdminClientForWatch", reflect.TypeOf((*MockClientGetter)(nil).TableAdminClientForWatch), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -214,7 +219,7 @@ func (m *MockClientGetter) TableClient(arg0 *types.APIRequest, arg1 *types.APISc
|
||||
}
|
||||
|
||||
// TableClient indicates an expected call of TableClient.
|
||||
func (mr *MockClientGetterMockRecorder) TableClient(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) TableClient(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableClient", reflect.TypeOf((*MockClientGetter)(nil).TableClient), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -229,7 +234,7 @@ func (m *MockClientGetter) TableClientForWatch(arg0 *types.APIRequest, arg1 *typ
|
||||
}
|
||||
|
||||
// TableClientForWatch indicates an expected call of TableClientForWatch.
|
||||
func (mr *MockClientGetterMockRecorder) TableClientForWatch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockClientGetterMockRecorder) TableClientForWatch(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableClientForWatch", reflect.TypeOf((*MockClientGetter)(nil).TableClientForWatch), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -267,7 +272,7 @@ func (m *MockCacheFactory) CacheFor(arg0 [][]string, arg1 cache.TransformFunc, a
|
||||
}
|
||||
|
||||
// CacheFor indicates an expected call of CacheFor.
|
||||
func (mr *MockCacheFactoryMockRecorder) CacheFor(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
|
||||
func (mr *MockCacheFactoryMockRecorder) CacheFor(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheFor", reflect.TypeOf((*MockCacheFactory)(nil).CacheFor), arg0, arg1, arg2, arg3, arg4, arg5)
|
||||
}
|
||||
@@ -318,7 +323,7 @@ func (m *MockSchemaColumnSetter) SetColumns(arg0 context.Context, arg1 *types.AP
|
||||
}
|
||||
|
||||
// SetColumns indicates an expected call of SetColumns.
|
||||
func (mr *MockSchemaColumnSetterMockRecorder) SetColumns(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockSchemaColumnSetterMockRecorder) SetColumns(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetColumns", reflect.TypeOf((*MockSchemaColumnSetter)(nil).SetColumns), arg0, arg1)
|
||||
}
|
||||
@@ -355,7 +360,7 @@ func (m *MockRelationshipNotifier) OnInboundRelationshipChange(arg0 context.Cont
|
||||
}
|
||||
|
||||
// OnInboundRelationshipChange indicates an expected call of OnInboundRelationshipChange.
|
||||
func (mr *MockRelationshipNotifierMockRecorder) OnInboundRelationshipChange(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
func (mr *MockRelationshipNotifierMockRecorder) OnInboundRelationshipChange(arg0, arg1, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnInboundRelationshipChange", reflect.TypeOf((*MockRelationshipNotifier)(nil).OnInboundRelationshipChange), arg0, arg1, arg2)
|
||||
}
|
||||
@@ -392,7 +397,7 @@ func (m *MockTransformBuilder) GetTransformFunc(arg0 schema.GroupVersionKind) ca
|
||||
}
|
||||
|
||||
// GetTransformFunc indicates an expected call of GetTransformFunc.
|
||||
func (mr *MockTransformBuilderMockRecorder) GetTransformFunc(arg0 interface{}) *gomock.Call {
|
||||
func (mr *MockTransformBuilderMockRecorder) GetTransformFunc(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransformFunc", reflect.TypeOf((*MockTransformBuilder)(nil).GetTransformFunc), arg0)
|
||||
}
|
||||
|
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/rancher/wrangler/v3/pkg/schemas/validation"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/rancher/lasso/pkg/cache/sql/informer"
|
||||
"github.com/rancher/lasso/pkg/cache/sql/informer/factory"
|
||||
"github.com/rancher/lasso/pkg/cache/sql/partition"
|
||||
@@ -20,6 +19,7 @@ import (
|
||||
"github.com/rancher/steve/pkg/resources/common"
|
||||
"github.com/rancher/steve/pkg/stores/sqlpartition/listprocessor"
|
||||
"github.com/rancher/steve/pkg/stores/sqlproxy/tablelistconvert"
|
||||
"go.uber.org/mock/gomock"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
@@ -1,5 +1,10 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/rancher/lasso/pkg/cache/sql/informer (interfaces: ByOptionsLister)
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen --build_flags=--mod=mod -package sqlproxy -destination ./sql_informer_mocks_test.go github.com/rancher/lasso/pkg/cache/sql/informer ByOptionsLister
|
||||
//
|
||||
|
||||
// Package sqlproxy is a generated GoMock package.
|
||||
package sqlproxy
|
||||
@@ -8,9 +13,9 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
informer "github.com/rancher/lasso/pkg/cache/sql/informer"
|
||||
partition "github.com/rancher/lasso/pkg/cache/sql/partition"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
)
|
||||
|
||||
@@ -49,7 +54,7 @@ func (m *MockByOptionsLister) ListByOptions(arg0 context.Context, arg1 informer.
|
||||
}
|
||||
|
||||
// ListByOptions indicates an expected call of ListByOptions.
|
||||
func (mr *MockByOptionsListerMockRecorder) ListByOptions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockByOptionsListerMockRecorder) ListByOptions(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByOptions", reflect.TypeOf((*MockByOptionsLister)(nil).ListByOptions), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@ package tablelistconvert
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/mock/gomock"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
watch2 "k8s.io/apimachinery/pkg/watch"
|
||||
|
@@ -1,5 +1,10 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: k8s.io/client-go/dynamic (interfaces: ResourceInterface)
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen --build_flags=--mod=mod -package tablelistconvert -destination ./dynamic_mocks_test.go k8s.io/client-go/dynamic ResourceInterface
|
||||
//
|
||||
|
||||
// Package tablelistconvert is a generated GoMock package.
|
||||
package tablelistconvert
|
||||
@@ -8,7 +13,7 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -41,7 +46,7 @@ func (m *MockResourceInterface) EXPECT() *MockResourceInterfaceMockRecorder {
|
||||
// Apply mocks base method.
|
||||
func (m *MockResourceInterface) Apply(arg0 context.Context, arg1 string, arg2 *unstructured.Unstructured, arg3 v1.ApplyOptions, arg4 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2, arg3}
|
||||
varargs := []any{arg0, arg1, arg2, arg3}
|
||||
for _, a := range arg4 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -52,9 +57,9 @@ func (m *MockResourceInterface) Apply(arg0 context.Context, arg1 string, arg2 *u
|
||||
}
|
||||
|
||||
// Apply indicates an expected call of Apply.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...)
|
||||
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResourceInterface)(nil).Apply), varargs...)
|
||||
}
|
||||
|
||||
@@ -68,7 +73,7 @@ func (m *MockResourceInterface) ApplyStatus(arg0 context.Context, arg1 string, a
|
||||
}
|
||||
|
||||
// ApplyStatus indicates an expected call of ApplyStatus.
|
||||
func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
@@ -76,7 +81,7 @@ func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3
|
||||
// Create mocks base method.
|
||||
func (m *MockResourceInterface) Create(arg0 context.Context, arg1 *unstructured.Unstructured, arg2 v1.CreateOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -87,16 +92,16 @@ func (m *MockResourceInterface) Create(arg0 context.Context, arg1 *unstructured.
|
||||
}
|
||||
|
||||
// Create indicates an expected call of Create.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockResourceInterface)(nil).Create), varargs...)
|
||||
}
|
||||
|
||||
// Delete mocks base method.
|
||||
func (m *MockResourceInterface) Delete(arg0 context.Context, arg1 string, arg2 v1.DeleteOptions, arg3 ...string) error {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -106,9 +111,9 @@ func (m *MockResourceInterface) Delete(arg0 context.Context, arg1 string, arg2 v
|
||||
}
|
||||
|
||||
// Delete indicates an expected call of Delete.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResourceInterface)(nil).Delete), varargs...)
|
||||
}
|
||||
|
||||
@@ -121,7 +126,7 @@ func (m *MockResourceInterface) DeleteCollection(arg0 context.Context, arg1 v1.D
|
||||
}
|
||||
|
||||
// DeleteCollection indicates an expected call of DeleteCollection.
|
||||
func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2)
|
||||
}
|
||||
@@ -129,7 +134,7 @@ func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 i
|
||||
// Get mocks base method.
|
||||
func (m *MockResourceInterface) Get(arg0 context.Context, arg1 string, arg2 v1.GetOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -140,9 +145,9 @@ func (m *MockResourceInterface) Get(arg0 context.Context, arg1 string, arg2 v1.G
|
||||
}
|
||||
|
||||
// Get indicates an expected call of Get.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResourceInterface)(nil).Get), varargs...)
|
||||
}
|
||||
|
||||
@@ -156,7 +161,7 @@ func (m *MockResourceInterface) List(arg0 context.Context, arg1 v1.ListOptions)
|
||||
}
|
||||
|
||||
// List indicates an expected call of List.
|
||||
func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockResourceInterface)(nil).List), arg0, arg1)
|
||||
}
|
||||
@@ -164,7 +169,7 @@ func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 interface{}) *gomoc
|
||||
// Patch mocks base method.
|
||||
func (m *MockResourceInterface) Patch(arg0 context.Context, arg1 string, arg2 types.PatchType, arg3 []byte, arg4 v1.PatchOptions, arg5 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2, arg3, arg4}
|
||||
varargs := []any{arg0, arg1, arg2, arg3, arg4}
|
||||
for _, a := range arg5 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -175,16 +180,16 @@ func (m *MockResourceInterface) Patch(arg0 context.Context, arg1 string, arg2 ty
|
||||
}
|
||||
|
||||
// Patch indicates an expected call of Patch.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 interface{}, arg5 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2, arg3, arg4}, arg5...)
|
||||
varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockResourceInterface)(nil).Patch), varargs...)
|
||||
}
|
||||
|
||||
// Update mocks base method.
|
||||
func (m *MockResourceInterface) Update(arg0 context.Context, arg1 *unstructured.Unstructured, arg2 v1.UpdateOptions, arg3 ...string) (*unstructured.Unstructured, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
@@ -195,9 +200,9 @@ func (m *MockResourceInterface) Update(arg0 context.Context, arg1 *unstructured.
|
||||
}
|
||||
|
||||
// Update indicates an expected call of Update.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockResourceInterface)(nil).Update), varargs...)
|
||||
}
|
||||
|
||||
@@ -211,7 +216,7 @@ func (m *MockResourceInterface) UpdateStatus(arg0 context.Context, arg1 *unstruc
|
||||
}
|
||||
|
||||
// UpdateStatus indicates an expected call of UpdateStatus.
|
||||
func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2)
|
||||
}
|
||||
@@ -226,7 +231,7 @@ func (m *MockResourceInterface) Watch(arg0 context.Context, arg1 v1.ListOptions)
|
||||
}
|
||||
|
||||
// Watch indicates an expected call of Watch.
|
||||
func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 interface{}) *gomock.Call {
|
||||
func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockResourceInterface)(nil).Watch), arg0, arg1)
|
||||
}
|
||||
|
@@ -1,5 +1,10 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: k8s.io/apimachinery/pkg/watch (interfaces: Interface)
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen --build_flags=--mod=mod -package tablelistconvert -destination ./watch_mocks_test.go k8s.io/apimachinery/pkg/watch Interface
|
||||
//
|
||||
|
||||
// Package tablelistconvert is a generated GoMock package.
|
||||
package tablelistconvert
|
||||
@@ -7,7 +12,7 @@ package tablelistconvert
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user