diff --git a/go.mod b/go.mod index a500d3a01ff..ce7129f566e 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.8.4 github.com/tsaarni/certyaml v0.9.2 - github.com/vektra/mockery/v2 v2.37.1 + github.com/vektra/mockery/v2 v2.38.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/oauth2 v0.15.0 gonum.org/v1/plot v0.14.0 diff --git a/go.sum b/go.sum index d1d7f8eff8f..ecb025056c0 100644 --- a/go.sum +++ b/go.sum @@ -381,8 +381,8 @@ github.com/tsaarni/certyaml v0.9.2 h1:LoRTuajwjJ1CHAJiMv5cpOtwQ05207Oqe6cT9D7WDa github.com/tsaarni/certyaml v0.9.2/go.mod h1:s+ErAC1wZ32r1ihSULvR7HXedKKN5HZasdb8Cj8gT9E= github.com/tsaarni/x500dn v1.0.0 h1:LvaWTkqRpse4VHBhB5uwf3wytokK4vF9IOyNAEyiA+U= github.com/tsaarni/x500dn v1.0.0/go.mod h1:QaHa3EcUKC4dfCAZmj8+ZRGLKukWgpGv9H3oOCsAbcE= -github.com/vektra/mockery/v2 v2.37.1 h1:UxNLZqcGEeDAnWZBV6vM5XyLyN1IWGOSTsHquFcOiL0= -github.com/vektra/mockery/v2 v2.37.1/go.mod h1:diB13hxXG6QrTR0ol2Rk8s2dRMftzvExSvPDKr+IYKk= +github.com/vektra/mockery/v2 v2.38.0 h1:I0LBuUzZHqAU4d1DknW0DTFBPO6n8TaD38WL2KJf3yI= +github.com/vektra/mockery/v2 v2.38.0/go.mod h1:diB13hxXG6QrTR0ol2Rk8s2dRMftzvExSvPDKr+IYKk= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/internal/controller/mocks/manager.go b/internal/controller/mocks/manager.go index 5109f606a80..ac7467283c1 100644 --- a/internal/controller/mocks/manager.go +++ b/internal/controller/mocks/manager.go @@ -40,6 +40,10 @@ type Manager struct { func (_m *Manager) Add(_a0 manager.Runnable) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 error if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { r0 = rf(_a0) @@ -54,6 +58,10 @@ func (_m *Manager) Add(_a0 manager.Runnable) error { func (_m *Manager) AddHealthzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddHealthzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -68,6 +76,10 @@ func (_m *Manager) AddHealthzCheck(name string, check healthz.Checker) error { func (_m *Manager) AddReadyzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddReadyzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -82,6 +94,10 @@ func (_m *Manager) AddReadyzCheck(name string, check healthz.Checker) error { func (_m *Manager) Elected() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Elected") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -98,6 +114,10 @@ func (_m *Manager) Elected() <-chan struct{} { func (_m *Manager) GetAPIReader() client.Reader { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAPIReader") + } + var r0 client.Reader if rf, ok := ret.Get(0).(func() client.Reader); ok { r0 = rf() @@ -114,6 +134,10 @@ func (_m *Manager) GetAPIReader() client.Reader { func (_m *Manager) GetCache() cache.Cache { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + var r0 cache.Cache if rf, ok := ret.Get(0).(func() cache.Cache); ok { r0 = rf() @@ -130,6 +154,10 @@ func (_m *Manager) GetCache() cache.Cache { func (_m *Manager) GetClient() client.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetClient") + } + var r0 client.Client if rf, ok := ret.Get(0).(func() client.Client); ok { r0 = rf() @@ -146,6 +174,10 @@ func (_m *Manager) GetClient() client.Client { func (_m *Manager) GetConfig() *rest.Config { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + var r0 *rest.Config if rf, ok := ret.Get(0).(func() *rest.Config); ok { r0 = rf() @@ -162,6 +194,10 @@ func (_m *Manager) GetConfig() *rest.Config { func (_m *Manager) GetControllerOptions() config.Controller { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetControllerOptions") + } + var r0 config.Controller if rf, ok := ret.Get(0).(func() config.Controller); ok { r0 = rf() @@ -176,6 +212,10 @@ func (_m *Manager) GetControllerOptions() config.Controller { func (_m *Manager) GetEventRecorderFor(name string) record.EventRecorder { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for GetEventRecorderFor") + } + var r0 record.EventRecorder if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { r0 = rf(name) @@ -192,6 +232,10 @@ func (_m *Manager) GetEventRecorderFor(name string) record.EventRecorder { func (_m *Manager) GetFieldIndexer() client.FieldIndexer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFieldIndexer") + } + var r0 client.FieldIndexer if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { r0 = rf() @@ -208,6 +252,10 @@ func (_m *Manager) GetFieldIndexer() client.FieldIndexer { func (_m *Manager) GetHTTPClient() *http.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHTTPClient") + } + var r0 *http.Client if rf, ok := ret.Get(0).(func() *http.Client); ok { r0 = rf() @@ -224,6 +272,10 @@ func (_m *Manager) GetHTTPClient() *http.Client { func (_m *Manager) GetLogger() logr.Logger { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLogger") + } + var r0 logr.Logger if rf, ok := ret.Get(0).(func() logr.Logger); ok { r0 = rf() @@ -238,6 +290,10 @@ func (_m *Manager) GetLogger() logr.Logger { func (_m *Manager) GetRESTMapper() meta.RESTMapper { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRESTMapper") + } + var r0 meta.RESTMapper if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { r0 = rf() @@ -254,6 +310,10 @@ func (_m *Manager) GetRESTMapper() meta.RESTMapper { func (_m *Manager) GetScheme() *runtime.Scheme { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetScheme") + } + var r0 *runtime.Scheme if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { r0 = rf() @@ -270,6 +330,10 @@ func (_m *Manager) GetScheme() *runtime.Scheme { func (_m *Manager) GetWebhookServer() webhook.Server { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetWebhookServer") + } + var r0 webhook.Server if rf, ok := ret.Get(0).(func() webhook.Server); ok { r0 = rf() @@ -286,6 +350,10 @@ func (_m *Manager) GetWebhookServer() webhook.Server { func (_m *Manager) Start(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) diff --git a/internal/debug/mocks/dag_builder.go b/internal/debug/mocks/dag_builder.go index 7b876bee396..7255b3f5802 100644 --- a/internal/debug/mocks/dag_builder.go +++ b/internal/debug/mocks/dag_builder.go @@ -17,6 +17,10 @@ type DagBuilder struct { func (_m *DagBuilder) Build() *dag.DAG { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 *dag.DAG if rf, ok := ret.Get(0).(func() *dag.DAG); ok { r0 = rf() diff --git a/internal/k8s/mocks/cache.go b/internal/k8s/mocks/cache.go index 9c77e45690e..992c31568d8 100644 --- a/internal/k8s/mocks/cache.go +++ b/internal/k8s/mocks/cache.go @@ -31,6 +31,10 @@ func (_m *Cache) Get(ctx context.Context, key types.NamespacedName, obj client.O _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName, client.Object, ...client.GetOption) error); ok { r0 = rf(ctx, key, obj, opts...) @@ -52,6 +56,10 @@ func (_m *Cache) GetInformer(ctx context.Context, obj client.Object, opts ...cac _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetInformer") + } + var r0 cache.Informer var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, ...cache.InformerGetOption) (cache.Informer, error)); ok { @@ -85,6 +93,10 @@ func (_m *Cache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersion _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetInformerForKind") + } + var r0 cache.Informer var r1 error if rf, ok := ret.Get(0).(func(context.Context, schema.GroupVersionKind, ...cache.InformerGetOption) (cache.Informer, error)); ok { @@ -111,6 +123,10 @@ func (_m *Cache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersion func (_m *Cache) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error { ret := _m.Called(ctx, obj, field, extractValue) + if len(ret) == 0 { + panic("no return value specified for IndexField") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, string, client.IndexerFunc) error); ok { r0 = rf(ctx, obj, field, extractValue) @@ -132,6 +148,10 @@ func (_m *Cache) List(ctx context.Context, list client.ObjectList, opts ...clien _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.ObjectList, ...client.ListOption) error); ok { r0 = rf(ctx, list, opts...) @@ -146,6 +166,10 @@ func (_m *Cache) List(ctx context.Context, list client.ObjectList, opts ...clien func (_m *Cache) Start(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -160,6 +184,10 @@ func (_m *Cache) Start(ctx context.Context) error { func (_m *Cache) WaitForCacheSync(ctx context.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for WaitForCacheSync") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx)