1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-01 15:37:31 +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:
Tom Lebreux
2025-02-03 15:16:36 -05:00
committed by GitHub
parent 458a12d2d7
commit d50101289f
22 changed files with 181 additions and 132 deletions

View File

@@ -7,11 +7,11 @@ import (
"net/url"
"testing"
"github.com/golang/mock/gomock"
"github.com/rancher/apiserver/pkg/types"
"github.com/rancher/lasso/pkg/cache/sql/informer"
"github.com/rancher/lasso/pkg/cache/sql/partition"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

View File

@@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/rancher/steve/pkg/stores/sqlproxy (interfaces: Cache)
//
// Generated by this command:
//
// mockgen --build_flags=--mod=mod -package listprocessor -destination ./proxy_mocks_test.go github.com/rancher/steve/pkg/stores/sqlproxy Cache
//
// Package listprocessor is a generated GoMock package.
package listprocessor
@@ -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 *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)
}