From ada3536c25c33f049dbad3617800e3e3a0da4df4 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 7 Mar 2024 13:41:19 +0100 Subject: [PATCH] upgrade mockery to v2.42.0 --- Makefile | 2 +- internal/sync/mocks/Sink.go | 26 +++++++++++++++++++++++++- internal/sync/mocks/Source.go | 14 +++++++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3dc042f..147b869 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ vendor: ## Vendor dependencies ## Test test: ## Run all tests - $(GO) run github.com/vektra/mockery/v2@v2.34.2 + $(GO) run github.com/vektra/mockery/v2@v2.42.0 $(GOTEST) -race $(GOLIST) coverage: ## Run tests with coverage and export it into 'profile.cov'. If 'COVERAGE_EXPORT' is true, 'COVERAGE_FILE' is written diff --git a/internal/sync/mocks/Sink.go b/internal/sync/mocks/Sink.go index 7603b1d..109ef97 100644 --- a/internal/sync/mocks/Sink.go +++ b/internal/sync/mocks/Sink.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.34.2. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *Sink) EXPECT() *Sink_Expecter { func (_m *Sink) CreateEvent(ctx context.Context, e models.Event) error { ret := _m.Called(ctx, e) + if len(ret) == 0 { + panic("no return value specified for CreateEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, models.Event) error); ok { r0 = rf(ctx, e) @@ -71,6 +75,10 @@ func (_c *Sink_CreateEvent_Call) RunAndReturn(run func(context.Context, models.E func (_m *Sink) DeleteEvent(ctx context.Context, e models.Event) error { ret := _m.Called(ctx, e) + if len(ret) == 0 { + panic("no return value specified for DeleteEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, models.Event) error); ok { r0 = rf(ctx, e) @@ -114,6 +122,10 @@ func (_c *Sink_DeleteEvent_Call) RunAndReturn(run func(context.Context, models.E func (_m *Sink) EventsInTimeframe(ctx context.Context, start time.Time, end time.Time) ([]models.Event, error) { ret := _m.Called(ctx, start, end) + if len(ret) == 0 { + panic("no return value specified for EventsInTimeframe") + } + var r0 []models.Event var r1 error if rf, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) ([]models.Event, error)); ok { @@ -170,6 +182,10 @@ func (_c *Sink_EventsInTimeframe_Call) RunAndReturn(run func(context.Context, ti func (_m *Sink) GetCalendarID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCalendarID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -211,6 +227,10 @@ func (_c *Sink_GetCalendarID_Call) RunAndReturn(run func() string) *Sink_GetCale func (_m *Sink) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -252,6 +272,10 @@ func (_c *Sink_Name_Call) RunAndReturn(run func() string) *Sink_Name_Call { func (_m *Sink) UpdateEvent(ctx context.Context, e models.Event) error { ret := _m.Called(ctx, e) + if len(ret) == 0 { + panic("no return value specified for UpdateEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, models.Event) error); ok { r0 = rf(ctx, e) diff --git a/internal/sync/mocks/Source.go b/internal/sync/mocks/Source.go index a3dc020..47ed373 100644 --- a/internal/sync/mocks/Source.go +++ b/internal/sync/mocks/Source.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.34.2. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *Source) EXPECT() *Source_Expecter { func (_m *Source) EventsInTimeframe(ctx context.Context, start time.Time, end time.Time) ([]models.Event, error) { ret := _m.Called(ctx, start, end) + if len(ret) == 0 { + panic("no return value specified for EventsInTimeframe") + } + var r0 []models.Event var r1 error if rf, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) ([]models.Event, error)); ok { @@ -84,6 +88,10 @@ func (_c *Source_EventsInTimeframe_Call) RunAndReturn(run func(context.Context, func (_m *Source) GetCalendarID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCalendarID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -125,6 +133,10 @@ func (_c *Source_GetCalendarID_Call) RunAndReturn(run func() string) *Source_Get func (_m *Source) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf()