From 6b1afa567f329c2fc5027a89bbba77a8b6994680 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Fri, 15 Dec 2023 09:39:10 +0100 Subject: [PATCH] generate code --- .../v1alpha1/zz_generated.deepcopy.go | 2 +- .../operator/eventing/mocks/controller.go | 18 +- .../operator/eventing/mocks/manager.go | 70 ++++++- .../eventing/mocks/nats_config_handler.go | 6 +- pkg/backend/jetstream/mocks/Backend.go | 34 +++- .../jetstream/mocks/JetStreamContext.go | 178 +++++++++++++++++- .../events/client/mocks/PublisherManager.go | 34 +++- pkg/eventing/mocks/manager.go | 26 ++- pkg/k8s/mocks/client.go | 78 +++++++- .../manager/mocks/manager.go | 14 +- .../mocks/manager_factory.go | 10 +- pkg/watcher/mocks/watcher.go | 10 +- 12 files changed, 468 insertions(+), 12 deletions(-) diff --git a/api/operator/v1alpha1/zz_generated.deepcopy.go b/api/operator/v1alpha1/zz_generated.deepcopy.go index a7bd0a7a..1a8cdd8f 100644 --- a/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/internal/controller/operator/eventing/mocks/controller.go b/internal/controller/operator/eventing/mocks/controller.go index 7cc68336..ecb91c2e 100644 --- a/internal/controller/operator/eventing/mocks/controller.go +++ b/internal/controller/operator/eventing/mocks/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -35,6 +35,10 @@ func (_m *Controller) EXPECT() *Controller_Expecter { func (_m *Controller) 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() @@ -76,6 +80,10 @@ func (_c *Controller_GetLogger_Call) RunAndReturn(run func() logr.Logger) *Contr func (_m *Controller) Reconcile(_a0 context.Context, _a1 reconcile.Request) (reconcile.Result, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Reconcile") + } + var r0 reconcile.Result var r1 error if rf, ok := ret.Get(0).(func(context.Context, reconcile.Request) (reconcile.Result, error)); ok { @@ -129,6 +137,10 @@ func (_c *Controller_Reconcile_Call) RunAndReturn(run func(context.Context, reco func (_m *Controller) 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) @@ -178,6 +190,10 @@ func (_m *Controller) Watch(src source.Source, eventhandler handler.EventHandler _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 error if rf, ok := ret.Get(0).(func(source.Source, handler.EventHandler, ...predicate.Predicate) error); ok { r0 = rf(src, eventhandler, predicates...) diff --git a/internal/controller/operator/eventing/mocks/manager.go b/internal/controller/operator/eventing/mocks/manager.go index 5f61310d..12739e00 100644 --- a/internal/controller/operator/eventing/mocks/manager.go +++ b/internal/controller/operator/eventing/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -48,6 +48,10 @@ func (_m *Manager) EXPECT() *Manager_Expecter { 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) @@ -90,6 +94,10 @@ func (_c *Manager_Add_Call) RunAndReturn(run func(manager.Runnable) error) *Mana 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) @@ -133,6 +141,10 @@ func (_c *Manager_AddHealthzCheck_Call) RunAndReturn(run func(string, healthz.Ch 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) @@ -176,6 +188,10 @@ func (_c *Manager_AddReadyzCheck_Call) RunAndReturn(run func(string, healthz.Che 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() @@ -219,6 +235,10 @@ func (_c *Manager_Elected_Call) RunAndReturn(run func() <-chan struct{}) *Manage 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() @@ -262,6 +282,10 @@ func (_c *Manager_GetAPIReader_Call) RunAndReturn(run func() client.Reader) *Man 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() @@ -305,6 +329,10 @@ func (_c *Manager_GetCache_Call) RunAndReturn(run func() cache.Cache) *Manager_G 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() @@ -348,6 +376,10 @@ func (_c *Manager_GetClient_Call) RunAndReturn(run func() client.Client) *Manage 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() @@ -391,6 +423,10 @@ func (_c *Manager_GetConfig_Call) RunAndReturn(run func() *rest.Config) *Manager 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() @@ -432,6 +468,10 @@ func (_c *Manager_GetControllerOptions_Call) RunAndReturn(run func() config.Cont 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) @@ -476,6 +516,10 @@ func (_c *Manager_GetEventRecorderFor_Call) RunAndReturn(run func(string) record 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() @@ -519,6 +563,10 @@ func (_c *Manager_GetFieldIndexer_Call) RunAndReturn(run func() client.FieldInde 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() @@ -562,6 +610,10 @@ func (_c *Manager_GetHTTPClient_Call) RunAndReturn(run func() *http.Client) *Man 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() @@ -603,6 +655,10 @@ func (_c *Manager_GetLogger_Call) RunAndReturn(run func() logr.Logger) *Manager_ 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() @@ -646,6 +702,10 @@ func (_c *Manager_GetRESTMapper_Call) RunAndReturn(run func() 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() @@ -689,6 +749,10 @@ func (_c *Manager_GetScheme_Call) RunAndReturn(run func() *runtime.Scheme) *Mana 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() @@ -732,6 +796,10 @@ func (_c *Manager_GetWebhookServer_Call) RunAndReturn(run func() 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/controller/operator/eventing/mocks/nats_config_handler.go b/internal/controller/operator/eventing/mocks/nats_config_handler.go index adc5591a..b6403fb0 100644 --- a/internal/controller/operator/eventing/mocks/nats_config_handler.go +++ b/internal/controller/operator/eventing/mocks/nats_config_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -29,6 +29,10 @@ func (_m *NatsConfigHandler) EXPECT() *NatsConfigHandler_Expecter { func (_m *NatsConfigHandler) GetNatsConfig(ctx context.Context, _a1 v1alpha1.Eventing) (*env.NATSConfig, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for GetNatsConfig") + } + var r0 *env.NATSConfig var r1 error if rf, ok := ret.Get(0).(func(context.Context, v1alpha1.Eventing) (*env.NATSConfig, error)); ok { diff --git a/pkg/backend/jetstream/mocks/Backend.go b/pkg/backend/jetstream/mocks/Backend.go index c3e98314..74fd1a32 100644 --- a/pkg/backend/jetstream/mocks/Backend.go +++ b/pkg/backend/jetstream/mocks/Backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -31,6 +31,10 @@ func (_m *Backend) EXPECT() *Backend_Expecter { func (_m *Backend) DeleteInvalidConsumers(subscriptions []v1alpha2.Subscription) error { ret := _m.Called(subscriptions) + if len(ret) == 0 { + panic("no return value specified for DeleteInvalidConsumers") + } + var r0 error if rf, ok := ret.Get(0).(func([]v1alpha2.Subscription) error); ok { r0 = rf(subscriptions) @@ -73,6 +77,10 @@ func (_c *Backend_DeleteInvalidConsumers_Call) RunAndReturn(run func([]v1alpha2. func (_m *Backend) DeleteSubscription(subscription *v1alpha2.Subscription) error { ret := _m.Called(subscription) + if len(ret) == 0 { + panic("no return value specified for DeleteSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(*v1alpha2.Subscription) error); ok { r0 = rf(subscription) @@ -115,6 +123,10 @@ func (_c *Backend_DeleteSubscription_Call) RunAndReturn(run func(*v1alpha2.Subsc func (_m *Backend) DeleteSubscriptionsOnly(subscription *v1alpha2.Subscription) error { ret := _m.Called(subscription) + if len(ret) == 0 { + panic("no return value specified for DeleteSubscriptionsOnly") + } + var r0 error if rf, ok := ret.Get(0).(func(*v1alpha2.Subscription) error); ok { r0 = rf(subscription) @@ -157,6 +169,10 @@ func (_c *Backend_DeleteSubscriptionsOnly_Call) RunAndReturn(run func(*v1alpha2. func (_m *Backend) GetConfig() env.NATSConfig { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + var r0 env.NATSConfig if rf, ok := ret.Get(0).(func() env.NATSConfig); ok { r0 = rf() @@ -198,6 +214,10 @@ func (_c *Backend_GetConfig_Call) RunAndReturn(run func() env.NATSConfig) *Backe func (_m *Backend) GetJetStreamContext() nats.JetStreamContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetJetStreamContext") + } + var r0 nats.JetStreamContext if rf, ok := ret.Get(0).(func() nats.JetStreamContext); ok { r0 = rf() @@ -241,6 +261,10 @@ func (_c *Backend_GetJetStreamContext_Call) RunAndReturn(run func() nats.JetStre func (_m *Backend) GetJetStreamSubjects(source string, subjects []string, typeMatching v1alpha2.TypeMatching) []string { ret := _m.Called(source, subjects, typeMatching) + if len(ret) == 0 { + panic("no return value specified for GetJetStreamSubjects") + } + var r0 []string if rf, ok := ret.Get(0).(func(string, []string, v1alpha2.TypeMatching) []string); ok { r0 = rf(source, subjects, typeMatching) @@ -287,6 +311,10 @@ func (_c *Backend_GetJetStreamSubjects_Call) RunAndReturn(run func(string, []str func (_m *Backend) Initialize(connCloseHandler utils.ConnClosedHandler) error { ret := _m.Called(connCloseHandler) + if len(ret) == 0 { + panic("no return value specified for Initialize") + } + var r0 error if rf, ok := ret.Get(0).(func(utils.ConnClosedHandler) error); ok { r0 = rf(connCloseHandler) @@ -361,6 +389,10 @@ func (_c *Backend_Shutdown_Call) RunAndReturn(run func()) *Backend_Shutdown_Call func (_m *Backend) SyncSubscription(subscription *v1alpha2.Subscription) error { ret := _m.Called(subscription) + if len(ret) == 0 { + panic("no return value specified for SyncSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(*v1alpha2.Subscription) error); ok { r0 = rf(subscription) diff --git a/pkg/backend/jetstream/mocks/JetStreamContext.go b/pkg/backend/jetstream/mocks/JetStreamContext.go index a2150ef3..c23f16b2 100644 --- a/pkg/backend/jetstream/mocks/JetStreamContext.go +++ b/pkg/backend/jetstream/mocks/JetStreamContext.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -30,6 +30,10 @@ func (_m *JetStreamContext) AccountInfo(opts ...nats.JSOpt) (*nats.AccountInfo, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AccountInfo") + } + var r0 *nats.AccountInfo var r1 error if rf, ok := ret.Get(0).(func(...nats.JSOpt) (*nats.AccountInfo, error)); ok { @@ -98,6 +102,10 @@ func (_m *JetStreamContext) AddConsumer(stream string, cfg *nats.ConsumerConfig, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AddConsumer") + } + var r0 *nats.ConsumerInfo var r1 error if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { @@ -168,6 +176,10 @@ func (_m *JetStreamContext) AddStream(cfg *nats.StreamConfig, opts ...nats.JSOpt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AddStream") + } + var r0 *nats.StreamInfo var r1 error if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { @@ -237,6 +249,10 @@ func (_m *JetStreamContext) ChanQueueSubscribe(subj string, queue string, ch cha _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChanQueueSubscribe") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -308,6 +324,10 @@ func (_m *JetStreamContext) ChanSubscribe(subj string, ch chan *nats.Msg, opts . _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChanSubscribe") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -378,6 +398,10 @@ func (_m *JetStreamContext) ConsumerInfo(stream string, name string, opts ...nat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ConsumerInfo") + } + var r0 *nats.ConsumerInfo var r1 error if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { @@ -448,6 +472,10 @@ func (_m *JetStreamContext) ConsumerNames(stream string, opts ...nats.JSOpt) <-c _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ConsumerNames") + } + var r0 <-chan string if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan string); ok { r0 = rf(stream, opts...) @@ -507,6 +535,10 @@ func (_m *JetStreamContext) Consumers(stream string, opts ...nats.JSOpt) <-chan _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Consumers") + } + var r0 <-chan *nats.ConsumerInfo if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo); ok { r0 = rf(stream, opts...) @@ -566,6 +598,10 @@ func (_m *JetStreamContext) ConsumersInfo(stream string, opts ...nats.JSOpt) <-c _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ConsumersInfo") + } + var r0 <-chan *nats.ConsumerInfo if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo); ok { r0 = rf(stream, opts...) @@ -618,6 +654,10 @@ func (_c *JetStreamContext_ConsumersInfo_Call) RunAndReturn(run func(string, ... func (_m *JetStreamContext) CreateKeyValue(cfg *nats.KeyValueConfig) (nats.KeyValue, error) { ret := _m.Called(cfg) + if len(ret) == 0 { + panic("no return value specified for CreateKeyValue") + } + var r0 nats.KeyValue var r1 error if rf, ok := ret.Get(0).(func(*nats.KeyValueConfig) (nats.KeyValue, error)); ok { @@ -672,6 +712,10 @@ func (_c *JetStreamContext_CreateKeyValue_Call) RunAndReturn(run func(*nats.KeyV func (_m *JetStreamContext) CreateObjectStore(cfg *nats.ObjectStoreConfig) (nats.ObjectStore, error) { ret := _m.Called(cfg) + if len(ret) == 0 { + panic("no return value specified for CreateObjectStore") + } + var r0 nats.ObjectStore var r1 error if rf, ok := ret.Get(0).(func(*nats.ObjectStoreConfig) (nats.ObjectStore, error)); ok { @@ -733,6 +777,10 @@ func (_m *JetStreamContext) DeleteConsumer(stream string, consumer string, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteConsumer") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) error); ok { r0 = rf(stream, consumer, opts...) @@ -784,6 +832,10 @@ func (_c *JetStreamContext_DeleteConsumer_Call) RunAndReturn(run func(string, st func (_m *JetStreamContext) DeleteKeyValue(bucket string) error { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for DeleteKeyValue") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(bucket) @@ -833,6 +885,10 @@ func (_m *JetStreamContext) DeleteMsg(name string, seq uint64, opts ...nats.JSOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) error); ok { r0 = rf(name, seq, opts...) @@ -884,6 +940,10 @@ func (_c *JetStreamContext_DeleteMsg_Call) RunAndReturn(run func(string, uint64, func (_m *JetStreamContext) DeleteObjectStore(bucket string) error { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for DeleteObjectStore") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(bucket) @@ -933,6 +993,10 @@ func (_m *JetStreamContext) DeleteStream(name string, opts ...nats.JSOpt) error _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteStream") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) error); ok { r0 = rf(name, opts...) @@ -990,6 +1054,10 @@ func (_m *JetStreamContext) GetLastMsg(name string, subject string, opts ...nats _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLastMsg") + } + var r0 *nats.RawStreamMsg var r1 error if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) (*nats.RawStreamMsg, error)); ok { @@ -1060,6 +1128,10 @@ func (_m *JetStreamContext) GetMsg(name string, seq uint64, opts ...nats.JSOpt) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMsg") + } + var r0 *nats.RawStreamMsg var r1 error if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) (*nats.RawStreamMsg, error)); ok { @@ -1123,6 +1195,10 @@ func (_c *JetStreamContext_GetMsg_Call) RunAndReturn(run func(string, uint64, .. func (_m *JetStreamContext) KeyValue(bucket string) (nats.KeyValue, error) { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for KeyValue") + } + var r0 nats.KeyValue var r1 error if rf, ok := ret.Get(0).(func(string) (nats.KeyValue, error)); ok { @@ -1177,6 +1253,10 @@ func (_c *JetStreamContext_KeyValue_Call) RunAndReturn(run func(string) (nats.Ke func (_m *JetStreamContext) KeyValueStoreNames() <-chan string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for KeyValueStoreNames") + } + var r0 <-chan string if rf, ok := ret.Get(0).(func() <-chan string); ok { r0 = rf() @@ -1220,6 +1300,10 @@ func (_c *JetStreamContext_KeyValueStoreNames_Call) RunAndReturn(run func() <-ch func (_m *JetStreamContext) KeyValueStores() <-chan nats.KeyValueStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for KeyValueStores") + } + var r0 <-chan nats.KeyValueStatus if rf, ok := ret.Get(0).(func() <-chan nats.KeyValueStatus); ok { r0 = rf() @@ -1263,6 +1347,10 @@ func (_c *JetStreamContext_KeyValueStores_Call) RunAndReturn(run func() <-chan n func (_m *JetStreamContext) ObjectStore(bucket string) (nats.ObjectStore, error) { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for ObjectStore") + } + var r0 nats.ObjectStore var r1 error if rf, ok := ret.Get(0).(func(string) (nats.ObjectStore, error)); ok { @@ -1323,6 +1411,10 @@ func (_m *JetStreamContext) ObjectStoreNames(opts ...nats.ObjectOpt) <-chan stri _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ObjectStoreNames") + } + var r0 <-chan string if rf, ok := ret.Get(0).(func(...nats.ObjectOpt) <-chan string); ok { r0 = rf(opts...) @@ -1380,6 +1472,10 @@ func (_m *JetStreamContext) ObjectStores(opts ...nats.ObjectOpt) <-chan nats.Obj _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ObjectStores") + } + var r0 <-chan nats.ObjectStoreStatus if rf, ok := ret.Get(0).(func(...nats.ObjectOpt) <-chan nats.ObjectStoreStatus); ok { r0 = rf(opts...) @@ -1438,6 +1534,10 @@ func (_m *JetStreamContext) Publish(subj string, data []byte, opts ...nats.PubOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 *nats.PubAck var r1 error if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) (*nats.PubAck, error)); ok { @@ -1508,6 +1608,10 @@ func (_m *JetStreamContext) PublishAsync(subj string, data []byte, opts ...nats. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PublishAsync") + } + var r0 nats.PubAckFuture var r1 error if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) (nats.PubAckFuture, error)); ok { @@ -1571,6 +1675,10 @@ func (_c *JetStreamContext_PublishAsync_Call) RunAndReturn(run func(string, []by func (_m *JetStreamContext) PublishAsyncComplete() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PublishAsyncComplete") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -1614,6 +1722,10 @@ func (_c *JetStreamContext_PublishAsyncComplete_Call) RunAndReturn(run func() <- func (_m *JetStreamContext) PublishAsyncPending() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PublishAsyncPending") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -1662,6 +1774,10 @@ func (_m *JetStreamContext) PublishMsg(m *nats.Msg, opts ...nats.PubOpt) (*nats. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PublishMsg") + } + var r0 *nats.PubAck var r1 error if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) (*nats.PubAck, error)); ok { @@ -1731,6 +1847,10 @@ func (_m *JetStreamContext) PublishMsgAsync(m *nats.Msg, opts ...nats.PubOpt) (n _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PublishMsgAsync") + } + var r0 nats.PubAckFuture var r1 error if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) (nats.PubAckFuture, error)); ok { @@ -1800,6 +1920,10 @@ func (_m *JetStreamContext) PullSubscribe(subj string, durable string, opts ...n _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PullSubscribe") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -1870,6 +1994,10 @@ func (_m *JetStreamContext) PurgeStream(name string, opts ...nats.JSOpt) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PurgeStream") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) error); ok { r0 = rf(name, opts...) @@ -1927,6 +2055,10 @@ func (_m *JetStreamContext) QueueSubscribe(subj string, queue string, cb nats.Ms _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for QueueSubscribe") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -1998,6 +2130,10 @@ func (_m *JetStreamContext) QueueSubscribeSync(subj string, queue string, opts . _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for QueueSubscribeSync") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -2068,6 +2204,10 @@ func (_m *JetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ...nat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SecureDeleteMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) error); ok { r0 = rf(name, seq, opts...) @@ -2126,6 +2266,10 @@ func (_m *JetStreamContext) StreamInfo(stream string, opts ...nats.JSOpt) (*nats _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamInfo") + } + var r0 *nats.StreamInfo var r1 error if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { @@ -2195,6 +2339,10 @@ func (_m *JetStreamContext) StreamNameBySubject(_a0 string, _a1 ...nats.JSOpt) ( _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamNameBySubject") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) (string, error)); ok { @@ -2261,6 +2409,10 @@ func (_m *JetStreamContext) StreamNames(opts ...nats.JSOpt) <-chan string { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamNames") + } + var r0 <-chan string if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan string); ok { r0 = rf(opts...) @@ -2318,6 +2470,10 @@ func (_m *JetStreamContext) Streams(opts ...nats.JSOpt) <-chan *nats.StreamInfo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Streams") + } + var r0 <-chan *nats.StreamInfo if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan *nats.StreamInfo); ok { r0 = rf(opts...) @@ -2375,6 +2531,10 @@ func (_m *JetStreamContext) StreamsInfo(opts ...nats.JSOpt) <-chan *nats.StreamI _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamsInfo") + } + var r0 <-chan *nats.StreamInfo if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan *nats.StreamInfo); ok { r0 = rf(opts...) @@ -2433,6 +2593,10 @@ func (_m *JetStreamContext) Subscribe(subj string, cb nats.MsgHandler, opts ...n _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -2503,6 +2667,10 @@ func (_m *JetStreamContext) SubscribeSync(subj string, opts ...nats.SubOpt) (*na _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeSync") + } + var r0 *nats.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, ...nats.SubOpt) (*nats.Subscription, error)); ok { @@ -2572,6 +2740,10 @@ func (_m *JetStreamContext) UpdateConsumer(stream string, cfg *nats.ConsumerConf _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateConsumer") + } + var r0 *nats.ConsumerInfo var r1 error if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { @@ -2642,6 +2814,10 @@ func (_m *JetStreamContext) UpdateStream(cfg *nats.StreamConfig, opts ...nats.JS _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateStream") + } + var r0 *nats.StreamInfo var r1 error if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { diff --git a/pkg/ems/api/events/client/mocks/PublisherManager.go b/pkg/ems/api/events/client/mocks/PublisherManager.go index c575f6f7..a10f800a 100644 --- a/pkg/ems/api/events/client/mocks/PublisherManager.go +++ b/pkg/ems/api/events/client/mocks/PublisherManager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *PublisherManager) EXPECT() *PublisherManager_Expecter { func (_m *PublisherManager) Create(subscription *types.Subscription) (*types.CreateResponse, error) { ret := _m.Called(subscription) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *types.CreateResponse var r1 error if rf, ok := ret.Get(0).(func(*types.Subscription) (*types.CreateResponse, error)); ok { @@ -80,6 +84,10 @@ func (_c *PublisherManager_Create_Call) RunAndReturn(run func(*types.Subscriptio func (_m *PublisherManager) Delete(name string) (*types.DeleteResponse, error) { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *types.DeleteResponse var r1 error if rf, ok := ret.Get(0).(func(string) (*types.DeleteResponse, error)); ok { @@ -134,6 +142,10 @@ func (_c *PublisherManager_Delete_Call) RunAndReturn(run func(string) (*types.De func (_m *PublisherManager) Get(name string) (*types.Subscription, *types.Response, error) { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *types.Subscription var r1 *types.Response var r2 error @@ -197,6 +209,10 @@ func (_c *PublisherManager_Get_Call) RunAndReturn(run func(string) (*types.Subsc func (_m *PublisherManager) List() (*types.Subscriptions, *types.Response, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *types.Subscriptions var r1 *types.Response var r2 error @@ -259,6 +275,10 @@ func (_c *PublisherManager_List_Call) RunAndReturn(run func() (*types.Subscripti func (_m *PublisherManager) Publish(cloudEvent event.Event, qos types.Qos) (*types.PublishResponse, error) { ret := _m.Called(cloudEvent, qos) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 *types.PublishResponse var r1 error if rf, ok := ret.Get(0).(func(event.Event, types.Qos) (*types.PublishResponse, error)); ok { @@ -314,6 +334,10 @@ func (_c *PublisherManager_Publish_Call) RunAndReturn(run func(event.Event, type func (_m *PublisherManager) TriggerHandshake(name string) (*types.TriggerHandshake, error) { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for TriggerHandshake") + } + var r0 *types.TriggerHandshake var r1 error if rf, ok := ret.Get(0).(func(string) (*types.TriggerHandshake, error)); ok { @@ -368,6 +392,10 @@ func (_c *PublisherManager_TriggerHandshake_Call) RunAndReturn(run func(string) func (_m *PublisherManager) Update(name string, webhookAuth *types.WebhookAuth) (*types.UpdateResponse, error) { ret := _m.Called(name, webhookAuth) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *types.UpdateResponse var r1 error if rf, ok := ret.Get(0).(func(string, *types.WebhookAuth) (*types.UpdateResponse, error)); ok { @@ -423,6 +451,10 @@ func (_c *PublisherManager_Update_Call) RunAndReturn(run func(string, *types.Web func (_m *PublisherManager) UpdateState(name string, state types.State) (*types.UpdateStateResponse, error) { ret := _m.Called(name, state) + if len(ret) == 0 { + panic("no return value specified for UpdateState") + } + var r0 *types.UpdateStateResponse var r1 error if rf, ok := ret.Get(0).(func(string, types.State) (*types.UpdateStateResponse, error)); ok { diff --git a/pkg/eventing/mocks/manager.go b/pkg/eventing/mocks/manager.go index 276ce666..3d3ca7e0 100644 --- a/pkg/eventing/mocks/manager.go +++ b/pkg/eventing/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -31,6 +31,10 @@ func (_m *Manager) EXPECT() *Manager_Expecter { func (_m *Manager) DeletePublisherProxyResources(ctx context.Context, _a1 *v1alpha1.Eventing) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for DeletePublisherProxyResources") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Eventing) error); ok { r0 = rf(ctx, _a1) @@ -74,6 +78,10 @@ func (_c *Manager_DeletePublisherProxyResources_Call) RunAndReturn(run func(cont func (_m *Manager) DeployPublisherProxy(ctx context.Context, _a1 *v1alpha1.Eventing, natsConfig *env.NATSConfig, backendType v1alpha1.BackendType) (*v1.Deployment, error) { ret := _m.Called(ctx, _a1, natsConfig, backendType) + if len(ret) == 0 { + panic("no return value specified for DeployPublisherProxy") + } + var r0 *v1.Deployment var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Eventing, *env.NATSConfig, v1alpha1.BackendType) (*v1.Deployment, error)); ok { @@ -131,6 +139,10 @@ func (_c *Manager_DeployPublisherProxy_Call) RunAndReturn(run func(context.Conte func (_m *Manager) DeployPublisherProxyResources(_a0 context.Context, _a1 *v1alpha1.Eventing, _a2 *v1.Deployment) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for DeployPublisherProxyResources") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Eventing, *v1.Deployment) error); ok { r0 = rf(_a0, _a1, _a2) @@ -175,6 +187,10 @@ func (_c *Manager_DeployPublisherProxyResources_Call) RunAndReturn(run func(cont func (_m *Manager) GetBackendConfig() *env.BackendConfig { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetBackendConfig") + } + var r0 *env.BackendConfig if rf, ok := ret.Get(0).(func() *env.BackendConfig); ok { r0 = rf() @@ -218,6 +234,10 @@ func (_c *Manager_GetBackendConfig_Call) RunAndReturn(run func() *env.BackendCon func (_m *Manager) IsNATSAvailable(ctx context.Context, namespace string) (bool, error) { ret := _m.Called(ctx, namespace) + if len(ret) == 0 { + panic("no return value specified for IsNATSAvailable") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { @@ -304,6 +324,10 @@ func (_c *Manager_SetBackendConfig_Call) RunAndReturn(run func(env.BackendConfig func (_m *Manager) SubscriptionExists(ctx context.Context) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SubscriptionExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { diff --git a/pkg/k8s/mocks/client.go b/pkg/k8s/mocks/client.go index 87946f13..b05dd234 100644 --- a/pkg/k8s/mocks/client.go +++ b/pkg/k8s/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -40,6 +40,10 @@ func (_m *Client) EXPECT() *Client_Expecter { func (_m *Client) APIRuleCRDExists(ctx context.Context) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for APIRuleCRDExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { @@ -92,6 +96,10 @@ func (_c *Client_APIRuleCRDExists_Call) RunAndReturn(run func(context.Context) ( func (_m *Client) ApplicationCRDExists(ctx context.Context) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ApplicationCRDExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { @@ -144,6 +152,10 @@ func (_c *Client_ApplicationCRDExists_Call) RunAndReturn(run func(context.Contex func (_m *Client) DeleteClusterRole(ctx context.Context, name string, namespace string) error { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for DeleteClusterRole") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, name, namespace) @@ -188,6 +200,10 @@ func (_c *Client_DeleteClusterRole_Call) RunAndReturn(run func(context.Context, func (_m *Client) DeleteClusterRoleBinding(ctx context.Context, name string, namespace string) error { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for DeleteClusterRoleBinding") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, name, namespace) @@ -232,6 +248,10 @@ func (_c *Client_DeleteClusterRoleBinding_Call) RunAndReturn(run func(context.Co func (_m *Client) DeleteDeployment(ctx context.Context, name string, namespace string) error { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for DeleteDeployment") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, name, namespace) @@ -276,6 +296,10 @@ func (_c *Client_DeleteDeployment_Call) RunAndReturn(run func(context.Context, s func (_m *Client) DeleteResource(ctx context.Context, object client.Object) error { ret := _m.Called(ctx, object) + if len(ret) == 0 { + panic("no return value specified for DeleteResource") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object) error); ok { r0 = rf(ctx, object) @@ -319,6 +343,10 @@ func (_c *Client_DeleteResource_Call) RunAndReturn(run func(context.Context, cli func (_m *Client) GetCRD(ctx context.Context, name string) (*v1.CustomResourceDefinition, error) { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for GetCRD") + } + var r0 *v1.CustomResourceDefinition var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.CustomResourceDefinition, error)); ok { @@ -374,6 +402,10 @@ func (_c *Client_GetCRD_Call) RunAndReturn(run func(context.Context, string) (*v func (_m *Client) GetConfigMap(ctx context.Context, name string, namespace string) (*corev1.ConfigMap, error) { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for GetConfigMap") + } + var r0 *corev1.ConfigMap var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*corev1.ConfigMap, error)); ok { @@ -430,6 +462,10 @@ func (_c *Client_GetConfigMap_Call) RunAndReturn(run func(context.Context, strin func (_m *Client) GetDeployment(ctx context.Context, name string, namespace string) (*appsv1.Deployment, error) { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for GetDeployment") + } + var r0 *appsv1.Deployment var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*appsv1.Deployment, error)); ok { @@ -486,6 +522,10 @@ func (_c *Client_GetDeployment_Call) RunAndReturn(run func(context.Context, stri func (_m *Client) GetDeploymentDynamic(ctx context.Context, name string, namespace string) (*appsv1.Deployment, error) { ret := _m.Called(ctx, name, namespace) + if len(ret) == 0 { + panic("no return value specified for GetDeploymentDynamic") + } + var r0 *appsv1.Deployment var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*appsv1.Deployment, error)); ok { @@ -542,6 +582,10 @@ func (_c *Client_GetDeploymentDynamic_Call) RunAndReturn(run func(context.Contex func (_m *Client) GetMutatingWebHookConfiguration(ctx context.Context, name string) (*admissionregistrationv1.MutatingWebhookConfiguration, error) { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for GetMutatingWebHookConfiguration") + } + var r0 *admissionregistrationv1.MutatingWebhookConfiguration var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*admissionregistrationv1.MutatingWebhookConfiguration, error)); ok { @@ -597,6 +641,10 @@ func (_c *Client_GetMutatingWebHookConfiguration_Call) RunAndReturn(run func(con func (_m *Client) GetNATSResources(ctx context.Context, namespace string) (*v1alpha1.NATSList, error) { ret := _m.Called(ctx, namespace) + if len(ret) == 0 { + panic("no return value specified for GetNATSResources") + } + var r0 *v1alpha1.NATSList var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.NATSList, error)); ok { @@ -652,6 +700,10 @@ func (_c *Client_GetNATSResources_Call) RunAndReturn(run func(context.Context, s func (_m *Client) GetSecret(ctx context.Context, namespacedName string) (*corev1.Secret, error) { ret := _m.Called(ctx, namespacedName) + if len(ret) == 0 { + panic("no return value specified for GetSecret") + } + var r0 *corev1.Secret var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { @@ -707,6 +759,10 @@ func (_c *Client_GetSecret_Call) RunAndReturn(run func(context.Context, string) func (_m *Client) GetSubscriptions(ctx context.Context) (*v1alpha2.SubscriptionList, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptions") + } + var r0 *v1alpha2.SubscriptionList var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha2.SubscriptionList, error)); ok { @@ -761,6 +817,10 @@ func (_c *Client_GetSubscriptions_Call) RunAndReturn(run func(context.Context) ( func (_m *Client) GetValidatingWebHookConfiguration(ctx context.Context, name string) (*admissionregistrationv1.ValidatingWebhookConfiguration, error) { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for GetValidatingWebHookConfiguration") + } + var r0 *admissionregistrationv1.ValidatingWebhookConfiguration var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*admissionregistrationv1.ValidatingWebhookConfiguration, error)); ok { @@ -816,6 +876,10 @@ func (_c *Client_GetValidatingWebHookConfiguration_Call) RunAndReturn(run func(c func (_m *Client) PatchApply(ctx context.Context, object client.Object) error { ret := _m.Called(ctx, object) + if len(ret) == 0 { + panic("no return value specified for PatchApply") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object) error); ok { r0 = rf(ctx, object) @@ -859,6 +923,10 @@ func (_c *Client_PatchApply_Call) RunAndReturn(run func(context.Context, client. func (_m *Client) PatchApplyPeerAuthentication(ctx context.Context, authentication *v1beta1.PeerAuthentication) error { ret := _m.Called(ctx, authentication) + if len(ret) == 0 { + panic("no return value specified for PatchApplyPeerAuthentication") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.PeerAuthentication) error); ok { r0 = rf(ctx, authentication) @@ -902,6 +970,10 @@ func (_c *Client_PatchApplyPeerAuthentication_Call) RunAndReturn(run func(contex func (_m *Client) PeerAuthenticationCRDExists(ctx context.Context) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for PeerAuthenticationCRDExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { @@ -954,6 +1026,10 @@ func (_c *Client_PeerAuthenticationCRDExists_Call) RunAndReturn(run func(context func (_m *Client) UpdateDeployment(ctx context.Context, deployment *appsv1.Deployment) error { ret := _m.Called(ctx, deployment) + if len(ret) == 0 { + panic("no return value specified for UpdateDeployment") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.Deployment) error); ok { r0 = rf(ctx, deployment) diff --git a/pkg/subscriptionmanager/manager/mocks/manager.go b/pkg/subscriptionmanager/manager/mocks/manager.go index 25b716cd..b31299a2 100644 --- a/pkg/subscriptionmanager/manager/mocks/manager.go +++ b/pkg/subscriptionmanager/manager/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *Manager) EXPECT() *Manager_Expecter { func (_m *Manager) Init(mgr manager.Manager) error { ret := _m.Called(mgr) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(manager.Manager) error); ok { r0 = rf(mgr) @@ -70,6 +74,10 @@ func (_c *Manager_Init_Call) RunAndReturn(run func(manager.Manager) error) *Mana func (_m *Manager) Start(defaultSubsConfig env.DefaultSubscriptionConfig, params subscriptionmanagermanager.Params) error { ret := _m.Called(defaultSubsConfig, params) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(env.DefaultSubscriptionConfig, subscriptionmanagermanager.Params) error); ok { r0 = rf(defaultSubsConfig, params) @@ -113,6 +121,10 @@ func (_c *Manager_Start_Call) RunAndReturn(run func(env.DefaultSubscriptionConfi func (_m *Manager) Stop(runCleanup bool) error { ret := _m.Called(runCleanup) + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func(bool) error); ok { r0 = rf(runCleanup) diff --git a/pkg/subscriptionmanager/mocks/manager_factory.go b/pkg/subscriptionmanager/mocks/manager_factory.go index 1eb0e996..9e7d9b18 100644 --- a/pkg/subscriptionmanager/mocks/manager_factory.go +++ b/pkg/subscriptionmanager/mocks/manager_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *ManagerFactory) EXPECT() *ManagerFactory_Expecter { func (_m *ManagerFactory) NewEventMeshManager(domain string) (manager.Manager, error) { ret := _m.Called(domain) + if len(ret) == 0 { + panic("no return value specified for NewEventMeshManager") + } + var r0 manager.Manager var r1 error if rf, ok := ret.Get(0).(func(string) (manager.Manager, error)); ok { @@ -81,6 +85,10 @@ func (_c *ManagerFactory_NewEventMeshManager_Call) RunAndReturn(run func(string) func (_m *ManagerFactory) NewJetStreamManager(_a0 v1alpha1.Eventing, _a1 env.NATSConfig) manager.Manager { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for NewJetStreamManager") + } + var r0 manager.Manager if rf, ok := ret.Get(0).(func(v1alpha1.Eventing, env.NATSConfig) manager.Manager); ok { r0 = rf(_a0, _a1) diff --git a/pkg/watcher/mocks/watcher.go b/pkg/watcher/mocks/watcher.go index 4341c7ec..96b0f584 100644 --- a/pkg/watcher/mocks/watcher.go +++ b/pkg/watcher/mocks/watcher.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -24,6 +24,10 @@ func (_m *Watcher) EXPECT() *Watcher_Expecter { func (_m *Watcher) GetEventsChannel() <-chan event.GenericEvent { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEventsChannel") + } + var r0 <-chan event.GenericEvent if rf, ok := ret.Get(0).(func() <-chan event.GenericEvent); ok { r0 = rf() @@ -67,6 +71,10 @@ func (_c *Watcher_GetEventsChannel_Call) RunAndReturn(run func() <-chan event.Ge func (_m *Watcher) IsStarted() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsStarted") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf()