diff --git a/api/operator/v1alpha1/zz_generated.deepcopy.go b/api/operator/v1alpha1/zz_generated.deepcopy.go index 25bcddd8..c227b344 100644 --- a/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/go.mod b/go.mod index fb041f42..36622b31 100644 --- a/go.mod +++ b/go.mod @@ -30,12 +30,12 @@ require ( golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da istio.io/api v1.24.2 istio.io/client-go v1.24.2 - k8s.io/api v0.32.0 - k8s.io/apiextensions-apiserver v0.32.0 - k8s.io/apimachinery v0.32.0 - k8s.io/client-go v0.32.0 + k8s.io/api v0.32.1 + k8s.io/apiextensions-apiserver v0.32.1 + k8s.io/apimachinery v0.32.1 + k8s.io/client-go v0.32.1 k8s.io/utils v0.0.0-20241210054802-24370beab758 - sigs.k8s.io/controller-runtime v0.19.4 + sigs.k8s.io/controller-runtime v0.20.0 ) require ( @@ -52,6 +52,7 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -94,7 +95,6 @@ require ( github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.31.0 // indirect - golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.33.0 // indirect golang.org/x/sync v0.10.0 // indirect diff --git a/go.sum b/go.sum index 979710a5..a8505690 100644 --- a/go.sum +++ b/go.sum @@ -58,6 +58,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -225,8 +227,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= @@ -318,22 +318,22 @@ istio.io/api v1.24.2 h1:jYjcN6Iq0RPtQj/3KMFsybxmfqmjGN/dxhL7FGJEdIM= istio.io/api v1.24.2/go.mod h1:MQnRok7RZ20/PE56v0LxmoWH0xVxnCQPNuf9O7PAN1I= istio.io/client-go v1.24.2 h1:JTTfBV6dv+AAW+AfccyrdX4T1f9CpsXd1Yzo1s/IYAI= istio.io/client-go v1.24.2/go.mod h1:dgZ9EmJzh1EECzf6nQhwNL4R6RvlyeH/RXeNeNp/MRg= -k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= -k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= -k8s.io/apiextensions-apiserver v0.32.0 h1:S0Xlqt51qzzqjKPxfgX1xh4HBZE+p8KKBq+k2SWNOE0= -k8s.io/apiextensions-apiserver v0.32.0/go.mod h1:86hblMvN5yxMvZrZFX2OhIHAuFIMJIZ19bTvzkP+Fmw= -k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= -k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= -k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= +k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= +k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= +k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= +k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= +k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= +k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.19.4 h1:SUmheabttt0nx8uJtoII4oIP27BVVvAKFvdvGFwV/Qo= -sigs.k8s.io/controller-runtime v0.19.4/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.20.0 h1:jjkMo29xEXH+02Md9qaVXfEIaMESSpy3TBWPrsfQkQs= +sigs.k8s.io/controller-runtime v0.20.0/go.mod h1:BrP3w158MwvB3ZbNpaAcIKkHQ7YGpYnzpoSTZ8E14WU= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= sigs.k8s.io/structured-merge-diff/v4 v4.4.3 h1:sCP7Vv3xx/CWIuTPVN38lUPx0uw0lcLfzaiDa8Ja01A= diff --git a/internal/connection/nats/mocks/connection.go b/internal/connection/nats/mocks/connection.go index 9c5e8eb3..24ec6cf4 100644 --- a/internal/connection/nats/mocks/connection.go +++ b/internal/connection/nats/mocks/connection.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -67,7 +67,7 @@ func (_c *Connection_Connect_Call) RunAndReturn(run func(nats.ConnHandler, nats. return _c } -// Disconnect provides a mock function with given fields: +// Disconnect provides a mock function with no fields func (_m *Connection) Disconnect() { _m.Called() } @@ -95,7 +95,7 @@ func (_c *Connection_Disconnect_Call) Return() *Connection_Disconnect_Call { } func (_c *Connection_Disconnect_Call) RunAndReturn(run func()) *Connection_Disconnect_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/internal/controller/eventing/subscription/validator/mocks/SubscriptionValidator.go b/internal/controller/eventing/subscription/validator/mocks/SubscriptionValidator.go index feb9bc48..797e3e10 100644 --- a/internal/controller/eventing/subscription/validator/mocks/SubscriptionValidator.go +++ b/internal/controller/eventing/subscription/validator/mocks/SubscriptionValidator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks diff --git a/internal/controller/operator/eventing/mocks/manager.go b/internal/controller/operator/eventing/mocks/manager.go index 22cbd7a3..f4c21543 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.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -231,7 +231,7 @@ func (_c *Manager_AddReadyzCheck_Call) RunAndReturn(run func(string, healthz.Che return _c } -// Elected provides a mock function with given fields: +// Elected provides a mock function with no fields func (_m *Manager) Elected() <-chan struct{} { ret := _m.Called() @@ -278,7 +278,7 @@ func (_c *Manager_Elected_Call) RunAndReturn(run func() <-chan struct{}) *Manage return _c } -// GetAPIReader provides a mock function with given fields: +// GetAPIReader provides a mock function with no fields func (_m *Manager) GetAPIReader() client.Reader { ret := _m.Called() @@ -325,7 +325,7 @@ func (_c *Manager_GetAPIReader_Call) RunAndReturn(run func() client.Reader) *Man return _c } -// GetCache provides a mock function with given fields: +// GetCache provides a mock function with no fields func (_m *Manager) GetCache() cache.Cache { ret := _m.Called() @@ -372,7 +372,7 @@ func (_c *Manager_GetCache_Call) RunAndReturn(run func() cache.Cache) *Manager_G return _c } -// GetClient provides a mock function with given fields: +// GetClient provides a mock function with no fields func (_m *Manager) GetClient() client.Client { ret := _m.Called() @@ -419,7 +419,7 @@ func (_c *Manager_GetClient_Call) RunAndReturn(run func() client.Client) *Manage return _c } -// GetConfig provides a mock function with given fields: +// GetConfig provides a mock function with no fields func (_m *Manager) GetConfig() *rest.Config { ret := _m.Called() @@ -466,7 +466,7 @@ func (_c *Manager_GetConfig_Call) RunAndReturn(run func() *rest.Config) *Manager return _c } -// GetControllerOptions provides a mock function with given fields: +// GetControllerOptions provides a mock function with no fields func (_m *Manager) GetControllerOptions() config.Controller { ret := _m.Called() @@ -559,7 +559,7 @@ func (_c *Manager_GetEventRecorderFor_Call) RunAndReturn(run func(string) record return _c } -// GetFieldIndexer provides a mock function with given fields: +// GetFieldIndexer provides a mock function with no fields func (_m *Manager) GetFieldIndexer() client.FieldIndexer { ret := _m.Called() @@ -606,7 +606,7 @@ func (_c *Manager_GetFieldIndexer_Call) RunAndReturn(run func() client.FieldInde return _c } -// GetHTTPClient provides a mock function with given fields: +// GetHTTPClient provides a mock function with no fields func (_m *Manager) GetHTTPClient() *http.Client { ret := _m.Called() @@ -653,7 +653,7 @@ func (_c *Manager_GetHTTPClient_Call) RunAndReturn(run func() *http.Client) *Man return _c } -// GetLogger provides a mock function with given fields: +// GetLogger provides a mock function with no fields func (_m *Manager) GetLogger() logr.Logger { ret := _m.Called() @@ -698,7 +698,7 @@ func (_c *Manager_GetLogger_Call) RunAndReturn(run func() logr.Logger) *Manager_ return _c } -// GetRESTMapper provides a mock function with given fields: +// GetRESTMapper provides a mock function with no fields func (_m *Manager) GetRESTMapper() meta.RESTMapper { ret := _m.Called() @@ -745,7 +745,7 @@ func (_c *Manager_GetRESTMapper_Call) RunAndReturn(run func() meta.RESTMapper) * return _c } -// GetScheme provides a mock function with given fields: +// GetScheme provides a mock function with no fields func (_m *Manager) GetScheme() *runtime.Scheme { ret := _m.Called() @@ -792,7 +792,7 @@ func (_c *Manager_GetScheme_Call) RunAndReturn(run func() *runtime.Scheme) *Mana return _c } -// GetWebhookServer provides a mock function with given fields: +// GetWebhookServer provides a mock function with no fields func (_m *Manager) GetWebhookServer() webhook.Server { ret := _m.Called() diff --git a/internal/controller/operator/eventing/mocks/nats_config_handler.go b/internal/controller/operator/eventing/mocks/nats_config_handler.go index 00665e70..c8f3809d 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.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks diff --git a/internal/controller/operator/eventing/mocks/typed_controller.go b/internal/controller/operator/eventing/mocks/typed_controller.go index bd64c041..e8bf1df4 100644 --- a/internal/controller/operator/eventing/mocks/typed_controller.go +++ b/internal/controller/operator/eventing/mocks/typed_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -27,7 +27,7 @@ func (_m *TypedController[request]) EXPECT() *TypedController_Expecter[request] return &TypedController_Expecter[request]{mock: &_m.Mock} } -// GetLogger provides a mock function with given fields: +// GetLogger provides a mock function with no fields func (_m *TypedController[request]) GetLogger() logr.Logger { ret := _m.Called() diff --git a/pkg/backend/jetstream/mocks/Backend.go b/pkg/backend/jetstream/mocks/Backend.go index b42cb9af..c601c50d 100644 --- a/pkg/backend/jetstream/mocks/Backend.go +++ b/pkg/backend/jetstream/mocks/Backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -165,7 +165,7 @@ func (_c *Backend_DeleteSubscriptionsOnly_Call) RunAndReturn(run func(*v1alpha2. return _c } -// GetConfig provides a mock function with given fields: +// GetConfig provides a mock function with no fields func (_m *Backend) GetConfig() env.NATSConfig { ret := _m.Called() @@ -210,7 +210,7 @@ func (_c *Backend_GetConfig_Call) RunAndReturn(run func() env.NATSConfig) *Backe return _c } -// GetJetStreamContext provides a mock function with given fields: +// GetJetStreamContext provides a mock function with no fields func (_m *Backend) GetJetStreamContext() nats.JetStreamContext { ret := _m.Called() @@ -353,7 +353,7 @@ func (_c *Backend_Initialize_Call) RunAndReturn(run func(utils.ConnClosedHandler return _c } -// Shutdown provides a mock function with given fields: +// Shutdown provides a mock function with no fields func (_m *Backend) Shutdown() { _m.Called() } @@ -381,7 +381,7 @@ func (_c *Backend_Shutdown_Call) Return() *Backend_Shutdown_Call { } func (_c *Backend_Shutdown_Call) RunAndReturn(run func()) *Backend_Shutdown_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/pkg/backend/jetstream/mocks/JetStreamContext.go b/pkg/backend/jetstream/mocks/JetStreamContext.go index 276a95bf..29984384 100644 --- a/pkg/backend/jetstream/mocks/JetStreamContext.go +++ b/pkg/backend/jetstream/mocks/JetStreamContext.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -387,7 +387,7 @@ func (_c *JetStreamContext_ChanSubscribe_Call) RunAndReturn(run func(string, cha return _c } -// CleanupPublisher provides a mock function with given fields: +// CleanupPublisher provides a mock function with no fields func (_m *JetStreamContext) CleanupPublisher() { _m.Called() } @@ -415,7 +415,7 @@ func (_c *JetStreamContext_CleanupPublisher_Call) Return() *JetStreamContext_Cle } func (_c *JetStreamContext_CleanupPublisher_Call) RunAndReturn(run func()) *JetStreamContext_CleanupPublisher_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1281,7 +1281,7 @@ func (_c *JetStreamContext_KeyValue_Call) RunAndReturn(run func(string) (nats.Ke return _c } -// KeyValueStoreNames provides a mock function with given fields: +// KeyValueStoreNames provides a mock function with no fields func (_m *JetStreamContext) KeyValueStoreNames() <-chan string { ret := _m.Called() @@ -1328,7 +1328,7 @@ func (_c *JetStreamContext_KeyValueStoreNames_Call) RunAndReturn(run func() <-ch return _c } -// KeyValueStores provides a mock function with given fields: +// KeyValueStores provides a mock function with no fields func (_m *JetStreamContext) KeyValueStores() <-chan nats.KeyValueStatus { ret := _m.Called() @@ -1703,7 +1703,7 @@ func (_c *JetStreamContext_PublishAsync_Call) RunAndReturn(run func(string, []by return _c } -// PublishAsyncComplete provides a mock function with given fields: +// PublishAsyncComplete provides a mock function with no fields func (_m *JetStreamContext) PublishAsyncComplete() <-chan struct{} { ret := _m.Called() @@ -1750,7 +1750,7 @@ func (_c *JetStreamContext_PublishAsyncComplete_Call) RunAndReturn(run func() <- return _c } -// PublishAsyncPending provides a mock function with given fields: +// PublishAsyncPending provides a mock function with no fields func (_m *JetStreamContext) PublishAsyncPending() int { ret := _m.Called() diff --git a/pkg/ems/api/events/client/mocks/PublisherManager.go b/pkg/ems/api/events/client/mocks/PublisherManager.go index 7cc3b66d..0032f5cd 100644 --- a/pkg/ems/api/events/client/mocks/PublisherManager.go +++ b/pkg/ems/api/events/client/mocks/PublisherManager.go @@ -1,11 +1,12 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks import ( - v2 "github.com/cloudevents/sdk-go/v2" - types "github.com/kyma-project/eventing-manager/pkg/ems/api/events/types" + event "github.com/cloudevents/sdk-go/v2/event" mock "github.com/stretchr/testify/mock" + + types "github.com/kyma-project/eventing-manager/pkg/ems/api/events/types" ) // PublisherManager is an autogenerated mock type for the PublisherManager type @@ -204,7 +205,7 @@ func (_c *PublisherManager_Get_Call) RunAndReturn(run func(string) (*types.Subsc return _c } -// List provides a mock function with given fields: +// List provides a mock function with no fields func (_m *PublisherManager) List() (*types.Subscriptions, *types.Response, error) { ret := _m.Called() @@ -271,7 +272,7 @@ func (_c *PublisherManager_List_Call) RunAndReturn(run func() (*types.Subscripti } // Publish provides a mock function with given fields: cloudEvent, qos -func (_m *PublisherManager) Publish(cloudEvent v2.Event, qos types.Qos) (*types.PublishResponse, error) { +func (_m *PublisherManager) Publish(cloudEvent event.Event, qos types.Qos) (*types.PublishResponse, error) { ret := _m.Called(cloudEvent, qos) if len(ret) == 0 { @@ -280,10 +281,10 @@ func (_m *PublisherManager) Publish(cloudEvent v2.Event, qos types.Qos) (*types. var r0 *types.PublishResponse var r1 error - if rf, ok := ret.Get(0).(func(v2.Event, types.Qos) (*types.PublishResponse, error)); ok { + if rf, ok := ret.Get(0).(func(event.Event, types.Qos) (*types.PublishResponse, error)); ok { return rf(cloudEvent, qos) } - if rf, ok := ret.Get(0).(func(v2.Event, types.Qos) *types.PublishResponse); ok { + if rf, ok := ret.Get(0).(func(event.Event, types.Qos) *types.PublishResponse); ok { r0 = rf(cloudEvent, qos) } else { if ret.Get(0) != nil { @@ -291,7 +292,7 @@ func (_m *PublisherManager) Publish(cloudEvent v2.Event, qos types.Qos) (*types. } } - if rf, ok := ret.Get(1).(func(v2.Event, types.Qos) error); ok { + if rf, ok := ret.Get(1).(func(event.Event, types.Qos) error); ok { r1 = rf(cloudEvent, qos) } else { r1 = ret.Error(1) @@ -306,15 +307,15 @@ type PublisherManager_Publish_Call struct { } // Publish is a helper method to define mock.On call -// - cloudEvent v2.Event +// - cloudEvent event.Event // - qos types.Qos func (_e *PublisherManager_Expecter) Publish(cloudEvent interface{}, qos interface{}) *PublisherManager_Publish_Call { return &PublisherManager_Publish_Call{Call: _e.mock.On("Publish", cloudEvent, qos)} } -func (_c *PublisherManager_Publish_Call) Run(run func(cloudEvent v2.Event, qos types.Qos)) *PublisherManager_Publish_Call { +func (_c *PublisherManager_Publish_Call) Run(run func(cloudEvent event.Event, qos types.Qos)) *PublisherManager_Publish_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(v2.Event), args[1].(types.Qos)) + run(args[0].(event.Event), args[1].(types.Qos)) }) return _c } @@ -324,7 +325,7 @@ func (_c *PublisherManager_Publish_Call) Return(_a0 *types.PublishResponse, _a1 return _c } -func (_c *PublisherManager_Publish_Call) RunAndReturn(run func(v2.Event, types.Qos) (*types.PublishResponse, error)) *PublisherManager_Publish_Call { +func (_c *PublisherManager_Publish_Call) RunAndReturn(run func(event.Event, types.Qos) (*types.PublishResponse, error)) *PublisherManager_Publish_Call { _c.Call.Return(run) return _c } diff --git a/pkg/eventing/mocks/manager.go b/pkg/eventing/mocks/manager.go index 5c7f05fc..f472c4ef 100644 --- a/pkg/eventing/mocks/manager.go +++ b/pkg/eventing/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks @@ -183,7 +183,7 @@ func (_c *Manager_DeployPublisherProxyResources_Call) RunAndReturn(run func(cont return _c } -// GetBackendConfig provides a mock function with given fields: +// GetBackendConfig provides a mock function with no fields func (_m *Manager) GetBackendConfig() *env.BackendConfig { ret := _m.Called() @@ -316,7 +316,7 @@ func (_c *Manager_SetBackendConfig_Call) Return() *Manager_SetBackendConfig_Call } func (_c *Manager_SetBackendConfig_Call) RunAndReturn(run func(env.BackendConfig)) *Manager_SetBackendConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/pkg/k8s/mocks/client.go b/pkg/k8s/mocks/client.go index 70a3cce8..7ac8f1b8 100644 --- a/pkg/k8s/mocks/client.go +++ b/pkg/k8s/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks diff --git a/pkg/subscriptionmanager/manager/mocks/manager.go b/pkg/subscriptionmanager/manager/mocks/manager.go index 08ed2d5e..ed347294 100644 --- a/pkg/subscriptionmanager/manager/mocks/manager.go +++ b/pkg/subscriptionmanager/manager/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks diff --git a/pkg/subscriptionmanager/mocks/manager_factory.go b/pkg/subscriptionmanager/mocks/manager_factory.go index 2e40124d..3847d26b 100644 --- a/pkg/subscriptionmanager/mocks/manager_factory.go +++ b/pkg/subscriptionmanager/mocks/manager_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks diff --git a/pkg/watcher/mocks/watcher.go b/pkg/watcher/mocks/watcher.go index 0321f236..43025a86 100644 --- a/pkg/watcher/mocks/watcher.go +++ b/pkg/watcher/mocks/watcher.go @@ -1,10 +1,12 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery v2.51.1. DO NOT EDIT. package mocks import ( - mock "github.com/stretchr/testify/mock" + client "sigs.k8s.io/controller-runtime/pkg/client" event "sigs.k8s.io/controller-runtime/pkg/event" + + mock "github.com/stretchr/testify/mock" ) // Watcher is an autogenerated mock type for the Watcher type @@ -20,20 +22,20 @@ func (_m *Watcher) EXPECT() *Watcher_Expecter { return &Watcher_Expecter{mock: &_m.Mock} } -// GetEventsChannel provides a mock function with given fields: -func (_m *Watcher) GetEventsChannel() <-chan event.GenericEvent { +// GetEventsChannel provides a mock function with no fields +func (_m *Watcher) GetEventsChannel() <-chan event.TypedGenericEvent[client.Object] { 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 { + var r0 <-chan event.TypedGenericEvent[client.Object] + if rf, ok := ret.Get(0).(func() <-chan event.TypedGenericEvent[client.Object]); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan event.GenericEvent) + r0 = ret.Get(0).(<-chan event.TypedGenericEvent[client.Object]) } } @@ -57,17 +59,17 @@ func (_c *Watcher_GetEventsChannel_Call) Run(run func()) *Watcher_GetEventsChann return _c } -func (_c *Watcher_GetEventsChannel_Call) Return(_a0 <-chan event.GenericEvent) *Watcher_GetEventsChannel_Call { +func (_c *Watcher_GetEventsChannel_Call) Return(_a0 <-chan event.TypedGenericEvent[client.Object]) *Watcher_GetEventsChannel_Call { _c.Call.Return(_a0) return _c } -func (_c *Watcher_GetEventsChannel_Call) RunAndReturn(run func() <-chan event.GenericEvent) *Watcher_GetEventsChannel_Call { +func (_c *Watcher_GetEventsChannel_Call) RunAndReturn(run func() <-chan event.TypedGenericEvent[client.Object]) *Watcher_GetEventsChannel_Call { _c.Call.Return(run) return _c } -// IsStarted provides a mock function with given fields: +// IsStarted provides a mock function with no fields func (_m *Watcher) IsStarted() bool { ret := _m.Called() @@ -112,7 +114,7 @@ func (_c *Watcher_IsStarted_Call) RunAndReturn(run func() bool) *Watcher_IsStart return _c } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *Watcher) Start() { _m.Called() } @@ -140,11 +142,11 @@ func (_c *Watcher_Start_Call) Return() *Watcher_Start_Call { } func (_c *Watcher_Start_Call) RunAndReturn(run func()) *Watcher_Start_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *Watcher) Stop() { _m.Called() } @@ -172,7 +174,7 @@ func (_c *Watcher_Stop_Call) Return() *Watcher_Stop_Call { } func (_c *Watcher_Stop_Call) RunAndReturn(run func()) *Watcher_Stop_Call { - _c.Call.Return(run) + _c.Run(run) return _c }