From cd3b5b46e120f5ce788f43d0a9cef99aff300c45 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 12 Apr 2024 19:01:24 +0530 Subject: [PATCH] Revert "MM-57759: Bump mockery to version 2.42.2 to support go 1.22^" (#26772) --- server/Makefile | 22 +- .../app/email/mocks/ServiceInterface.go | 167 +--- .../channels/app/platform/mocks/SuiteIFace.go | 14 +- .../store/storetest/mocks/AuditStore.go | 23 +- .../store/storetest/mocks/BotStore.go | 31 +- .../storetest/mocks/ChannelBookmarkStore.go | 39 +- .../mocks/ChannelMemberHistoryStore.go | 39 +- .../store/storetest/mocks/ChannelStore.go | 447 +---------- .../storetest/mocks/ClusterDiscoveryStore.go | 35 +- .../store/storetest/mocks/CommandStore.go | 47 +- .../storetest/mocks/CommandWebhookStore.go | 23 +- .../store/storetest/mocks/ComplianceStore.go | 35 +- .../storetest/mocks/DesktopTokensStore.go | 31 +- .../store/storetest/mocks/DraftStore.go | 43 +- .../store/storetest/mocks/EmojiStore.go | 39 +- .../store/storetest/mocks/FileInfoStore.go | 91 +-- .../store/storetest/mocks/GroupStore.go | 227 +----- .../store/storetest/mocks/JobStore.go | 75 +- .../store/storetest/mocks/LicenseStore.go | 23 +- .../storetest/mocks/LinkMetadataStore.go | 19 +- .../store/storetest/mocks/NotifyAdminStore.go | 31 +- .../store/storetest/mocks/OAuthStore.go | 95 +-- .../mocks/OutgoingOAuthConnectionStore.go | 31 +- .../store/storetest/mocks/PluginStore.go | 47 +- .../mocks/PostAcknowledgementStore.go | 31 +- .../mocks/PostPersistentNotificationStore.go | 39 +- .../storetest/mocks/PostPriorityStore.go | 19 +- .../store/storetest/mocks/PostStore.go | 191 +---- .../store/storetest/mocks/PreferenceStore.go | 55 +- .../storetest/mocks/ProductNoticesStore.go | 27 +- .../store/storetest/mocks/ReactionStore.go | 55 +- .../storetest/mocks/RemoteClusterStore.go | 43 +- .../storetest/mocks/RetentionPolicyStore.go | 91 +-- .../store/storetest/mocks/RoleStore.go | 51 +- .../store/storetest/mocks/SchemeStore.go | 43 +- .../store/storetest/mocks/SessionStore.go | 79 +- .../storetest/mocks/SharedChannelStore.go | 115 +-- .../store/storetest/mocks/StatusStore.go | 39 +- .../channels/store/storetest/mocks/Store.go | 251 +----- .../store/storetest/mocks/SystemStore.go | 39 +- .../store/storetest/mocks/TeamStore.go | 211 +---- .../storetest/mocks/TermsOfServiceStore.go | 23 +- .../store/storetest/mocks/ThreadStore.go | 103 +-- .../store/storetest/mocks/TokenStore.go | 31 +- .../storetest/mocks/TrueUpReviewStore.go | 23 +- .../storetest/mocks/UploadSessionStore.go | 31 +- .../storetest/mocks/UserAccessTokenStore.go | 51 +- .../store/storetest/mocks/UserStore.go | 319 +------- .../mocks/UserTermsOfServiceStore.go | 23 +- .../store/storetest/mocks/WebhookStore.go | 111 +-- .../utils/mocks/LicenseValidatorIface.go | 19 +- .../mocks/AccountMigrationInterface.go | 19 +- server/einterfaces/mocks/CloudInterface.go | 147 +--- server/einterfaces/mocks/CloudJobInterface.go | 19 +- server/einterfaces/mocks/ClusterInterface.go | 55 +- .../mocks/ClusterMessageHandler.go | 11 +- .../einterfaces/mocks/ComplianceInterface.go | 15 +- .../mocks/DataRetentionInterface.go | 71 +- .../mocks/DataRetentionJobInterface.go | 19 +- .../mocks/ElasticsearchAggregatorInterface.go | 19 +- .../mocks/ElasticsearchIndexerInterface.go | 15 +- .../einterfaces/mocks/IPFilteringInterface.go | 19 +- .../einterfaces/mocks/IndexerJobInterface.go | 15 +- server/einterfaces/mocks/LdapInterface.go | 79 +- server/einterfaces/mocks/LdapSyncInterface.go | 19 +- server/einterfaces/mocks/LicenseInterface.go | 19 +- .../mocks/MessageExportInterface.go | 19 +- .../mocks/MessageExportJobInterface.go | 19 +- server/einterfaces/mocks/MetricsInterface.go | 15 +- .../mocks/NotificationInterface.go | 19 +- server/einterfaces/mocks/OAuthProvider.go | 27 +- .../mocks/OutgoingOAuthConnectionInterface.go | 39 +- server/einterfaces/mocks/SamlInterface.go | 31 +- server/einterfaces/mocks/Scheduler.go | 23 +- .../mocks/SearchEngineInterface.go | 155 +--- .../sharedchannel/mock_AppIface_test.go | 87 +- .../sharedchannel/mock_ServerIface_test.go | 39 +- .../services/telemetry/mocks/ServerIface.go | 39 +- .../shared/filestore/mocks/FileBackend.go | 71 +- .../mocks/FileBackendWithLinkGenerator.go | 15 +- .../shared/filestore/mocks/ReadCloseSeeker.go | 23 +- server/public/plugin/plugintest/api.go | 759 +----------------- server/public/plugin/plugintest/driver.go | 91 +-- server/public/plugin/plugintest/hooks.go | 83 +- 84 files changed, 504 insertions(+), 5378 deletions(-) diff --git a/server/Makefile b/server/Makefile index 28ace170c2..b73bee82d3 100644 --- a/server/Makefile +++ b/server/Makefile @@ -311,11 +311,11 @@ i18n-check: ## Exit on empty translation strings and translation source strings $(GOBIN)/mmgotool i18n check-empty-src --portal-dir="" store-mocks: ## Creates mock files. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir channels/store --name ".*Store" --output channels/store/storetest/mocks --note 'Regenerate this file using `make store-mocks`.' telemetry-mocks: ## Creates mock files. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir platform/services/telemetry --all --output platform/services/telemetry/mocks --note 'Regenerate this file using `make telemetry-mocks`.' store-layers: ## Generate layers for the store @@ -330,42 +330,42 @@ new-migration: ## Creates a new migration. Run with make new-migration name=<> $(GOBIN)/morph new script $(name) --driver postgres --dir channels/db/migrations --sequence filestore-mocks: ## Creates mock files. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir platform/shared/filestore --all --output platform/shared/filestore/mocks --note 'Regenerate this file using `make filestore-mocks`.' ldap-mocks: ## Creates mock files for ldap. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir $(BUILD_ENTERPRISE_DIR)/ldap --all --output $(BUILD_ENTERPRISE_DIR)/ldap/mocks --note 'Regenerate this file using `make ldap-mocks`.' plugin-mocks: ## Creates mock files for plugins. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir ./public/plugin --name API --output ./public/plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.' $(GOBIN)/mockery --dir ./public/plugin --name Hooks --output ./public/plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.' $(GOBIN)/mockery --dir ./public/plugin --name Driver --output ./public/plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.' einterfaces-mocks: ## Creates mock files for einterfaces. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir einterfaces --all --output einterfaces/mocks --note 'Regenerate this file using `make einterfaces-mocks`.' searchengine-mocks: ## Creates mock files for searchengines. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir platform/services/searchengine --all --output platform/services/searchengine/mocks --note 'Regenerate this file using `make searchengine-mocks`.' sharedchannel-mocks: ## Creates mock files for shared channels. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir=./platform/services/sharedchannel --name=ServerIface --output=./platform/services/sharedchannel --inpackage --outpkg=sharedchannel --testonly --note 'Regenerate this file using `make sharedchannel-mocks`.' $(GOBIN)/mockery --dir=./platform/services/sharedchannel --name=AppIface --output=./platform/services/sharedchannel --inpackage --outpkg=sharedchannel --testonly --note 'Regenerate this file using `make sharedchannel-mocks`.' misc-mocks: ## Creates mocks for misc interfaces. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir channels/utils --name LicenseValidatorIface --output channels/utils/mocks --note 'Regenerate this file using `make misc-mocks`.' email-mocks: ## Creates mocks for misc interfaces. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.23.2 $(GOBIN)/mockery --dir channels/app/email --name ServiceInterface --output channels/app/email/mocks --note 'Regenerate this file using `make email-mocks`.' platform-mocks: ## Creates mocks for platform interfaces. - $(GO) install github.com/vektra/mockery/v2/...@v2.42.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.32.2 $(GOBIN)/mockery --dir channels/app/platform --name SuiteIFace --output channels/app/platform/mocks --note 'Regenerate this file using `make platform-mocks`.' mmctl-mocks: ## Creates mocks for mmctl diff --git a/server/channels/app/email/mocks/ServiceInterface.go b/server/channels/app/email/mocks/ServiceInterface.go index 8a8ee01420..ea78445a1a 100644 --- a/server/channels/app/email/mocks/ServiceInterface.go +++ b/server/channels/app/email/mocks/ServiceInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make email-mocks`. @@ -29,10 +29,6 @@ type ServiceInterface struct { func (_m *ServiceInterface) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError { ret := _m.Called(user, post, team) - if len(ret) == 0 { - panic("no return value specified for AddNotificationEmailToBatch") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.User, *model.Post, *model.Team) *model.AppError); ok { r0 = rf(user, post, team) @@ -49,10 +45,6 @@ func (_m *ServiceInterface) AddNotificationEmailToBatch(user *model.User, post * func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail string) (*model.Token, error) { ret := _m.Called(userID, newEmail) - if len(ret) == 0 { - panic("no return value specified for CreateVerifyEmailToken") - } - var r0 *model.Token var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Token, error)); ok { @@ -79,10 +71,6 @@ func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail strin func (_m *ServiceInterface) GenerateHyperlinkForChannels(postMessage string, teamName string, teamURL string) (string, error) { ret := _m.Called(postMessage, teamName, teamURL) - if len(ret) == 0 { - panic("no return value specified for GenerateHyperlinkForChannels") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (string, error)); ok { @@ -107,10 +95,6 @@ func (_m *ServiceInterface) GenerateHyperlinkForChannels(postMessage string, tea func (_m *ServiceInterface) GetMessageForNotification(post *model.Post, teamName string, siteUrl string, translateFunc i18n.TranslateFunc) string { ret := _m.Called(post, teamName, siteUrl, translateFunc) - if len(ret) == 0 { - panic("no return value specified for GetMessageForNotification") - } - var r0 string if rf, ok := ret.Get(0).(func(*model.Post, string, string, i18n.TranslateFunc) string); ok { r0 = rf(post, teamName, siteUrl, translateFunc) @@ -125,10 +109,6 @@ func (_m *ServiceInterface) GetMessageForNotification(post *model.Post, teamName func (_m *ServiceInterface) GetPerDayEmailRateLimiter() *throttled.GCRARateLimiter { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPerDayEmailRateLimiter") - } - var r0 *throttled.GCRARateLimiter if rf, ok := ret.Get(0).(func() *throttled.GCRARateLimiter); ok { r0 = rf() @@ -150,10 +130,6 @@ func (_m *ServiceInterface) InitEmailBatching() { func (_m *ServiceInterface) NewEmailTemplateData(locale string) templates.Data { ret := _m.Called(locale) - if len(ret) == 0 { - panic("no return value specified for NewEmailTemplateData") - } - var r0 templates.Data if rf, ok := ret.Get(0).(func(string) templates.Data); ok { r0 = rf(locale) @@ -168,10 +144,6 @@ func (_m *ServiceInterface) NewEmailTemplateData(locale string) templates.Data { func (_m *ServiceInterface) SendChangeUsernameEmail(newUsername string, _a1 string, locale string, siteURL string) error { ret := _m.Called(newUsername, _a1, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendChangeUsernameEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(newUsername, _a1, locale, siteURL) @@ -186,10 +158,6 @@ func (_m *ServiceInterface) SendChangeUsernameEmail(newUsername string, _a1 stri func (_m *ServiceInterface) SendCloudRenewalEmail30(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendCloudRenewalEmail30") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -204,10 +172,6 @@ func (_m *ServiceInterface) SendCloudRenewalEmail30(_a0 string, locale string, s func (_m *ServiceInterface) SendCloudRenewalEmail60(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendCloudRenewalEmail60") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -222,10 +186,6 @@ func (_m *ServiceInterface) SendCloudRenewalEmail60(_a0 string, locale string, s func (_m *ServiceInterface) SendCloudRenewalEmail7(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendCloudRenewalEmail7") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -240,10 +200,6 @@ func (_m *ServiceInterface) SendCloudRenewalEmail7(_a0 string, locale string, si func (_m *ServiceInterface) SendCloudUpgradeConfirmationEmail(userEmail string, name string, trialEndDate string, locale string, siteURL string, workspaceName string, isYearly bool, embeddedFiles map[string]io.Reader) error { ret := _m.Called(userEmail, name, trialEndDate, locale, siteURL, workspaceName, isYearly, embeddedFiles) - if len(ret) == 0 { - panic("no return value specified for SendCloudUpgradeConfirmationEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string, string, bool, map[string]io.Reader) error); ok { r0 = rf(userEmail, name, trialEndDate, locale, siteURL, workspaceName, isYearly, embeddedFiles) @@ -258,10 +214,6 @@ func (_m *ServiceInterface) SendCloudUpgradeConfirmationEmail(userEmail string, func (_m *ServiceInterface) SendCloudWelcomeEmail(userEmail string, locale string, teamInviteID string, workSpaceName string, dns string, siteURL string) error { ret := _m.Called(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendCloudWelcomeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string, string) error); ok { r0 = rf(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL) @@ -276,10 +228,6 @@ func (_m *ServiceInterface) SendCloudWelcomeEmail(userEmail string, locale strin func (_m *ServiceInterface) SendDeactivateAccountEmail(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendDeactivateAccountEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -294,10 +242,6 @@ func (_m *ServiceInterface) SendDeactivateAccountEmail(_a0 string, locale string func (_m *ServiceInterface) SendDelinquencyEmail14(_a0 string, locale string, siteURL string, planName string) error { ret := _m.Called(_a0, locale, siteURL, planName) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail14") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(_a0, locale, siteURL, planName) @@ -312,10 +256,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail14(_a0 string, locale string, si func (_m *ServiceInterface) SendDelinquencyEmail30(_a0 string, locale string, siteURL string, planName string) error { ret := _m.Called(_a0, locale, siteURL, planName) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail30") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(_a0, locale, siteURL, planName) @@ -330,10 +270,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail30(_a0 string, locale string, si func (_m *ServiceInterface) SendDelinquencyEmail45(_a0 string, locale string, siteURL string, planName string, delinquencyDate string) error { ret := _m.Called(_a0, locale, siteURL, planName, delinquencyDate) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail45") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { r0 = rf(_a0, locale, siteURL, planName, delinquencyDate) @@ -348,10 +284,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail45(_a0 string, locale string, si func (_m *ServiceInterface) SendDelinquencyEmail60(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail60") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -366,10 +298,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail60(_a0 string, locale string, si func (_m *ServiceInterface) SendDelinquencyEmail7(_a0 string, locale string, siteURL string, planName string) error { ret := _m.Called(_a0, locale, siteURL, planName) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail7") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(_a0, locale, siteURL, planName) @@ -384,10 +312,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail7(_a0 string, locale string, sit func (_m *ServiceInterface) SendDelinquencyEmail75(_a0 string, locale string, siteURL string, planName string, delinquencyDate string) error { ret := _m.Called(_a0, locale, siteURL, planName, delinquencyDate) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail75") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { r0 = rf(_a0, locale, siteURL, planName, delinquencyDate) @@ -402,10 +326,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail75(_a0 string, locale string, si func (_m *ServiceInterface) SendDelinquencyEmail90(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendDelinquencyEmail90") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -420,10 +340,6 @@ func (_m *ServiceInterface) SendDelinquencyEmail90(_a0 string, locale string, si func (_m *ServiceInterface) SendEmailChangeEmail(oldEmail string, newEmail string, locale string, siteURL string) error { ret := _m.Called(oldEmail, newEmail, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendEmailChangeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(oldEmail, newEmail, locale, siteURL) @@ -438,10 +354,6 @@ func (_m *ServiceInterface) SendEmailChangeEmail(oldEmail string, newEmail strin func (_m *ServiceInterface) SendEmailChangeVerifyEmail(newUserEmail string, locale string, siteURL string, token string) error { ret := _m.Called(newUserEmail, locale, siteURL, token) - if len(ret) == 0 { - panic("no return value specified for SendEmailChangeVerifyEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(newUserEmail, locale, siteURL, token) @@ -456,10 +368,6 @@ func (_m *ServiceInterface) SendEmailChangeVerifyEmail(newUserEmail string, loca func (_m *ServiceInterface) SendGuestInviteEmails(team *model.Team, channels []*model.Channel, senderName string, senderUserId string, senderProfileImage []byte, invites []string, siteURL string, message string, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool) error { ret := _m.Called(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin) - if len(ret) == 0 { - panic("no return value specified for SendGuestInviteEmails") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, string, bool, bool, bool) error); ok { r0 = rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin) @@ -474,10 +382,6 @@ func (_m *ServiceInterface) SendGuestInviteEmails(team *model.Team, channels []* func (_m *ServiceInterface) SendIPFiltersChangedEmail(_a0 string, userWhoChangedFilter *model.User, siteURL string, portalURL string, locale string, isWorkspaceOwner bool) error { ret := _m.Called(_a0, userWhoChangedFilter, siteURL, portalURL, locale, isWorkspaceOwner) - if len(ret) == 0 { - panic("no return value specified for SendIPFiltersChangedEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, *model.User, string, string, string, bool) error); ok { r0 = rf(_a0, userWhoChangedFilter, siteURL, portalURL, locale, isWorkspaceOwner) @@ -492,10 +396,6 @@ func (_m *ServiceInterface) SendIPFiltersChangedEmail(_a0 string, userWhoChanged func (_m *ServiceInterface) SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, siteURL string, reminderData *model.TeamInviteReminderData, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool) error { ret := _m.Called(team, senderName, senderUserId, invites, siteURL, reminderData, errorWhenNotSent, isSystemAdmin, isFirstAdmin) - if len(ret) == 0 { - panic("no return value specified for SendInviteEmails") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Team, string, string, []string, string, *model.TeamInviteReminderData, bool, bool, bool) error); ok { r0 = rf(team, senderName, senderUserId, invites, siteURL, reminderData, errorWhenNotSent, isSystemAdmin, isFirstAdmin) @@ -510,10 +410,6 @@ func (_m *ServiceInterface) SendInviteEmails(team *model.Team, senderName string func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team, channels []*model.Channel, senderName string, senderUserId string, senderProfileImage []byte, invites []string, siteURL string, reminderData *model.TeamInviteReminderData, message string, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool) ([]*model.EmailInviteWithError, error) { ret := _m.Called(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin) - if len(ret) == 0 { - panic("no return value specified for SendInviteEmailsToTeamAndChannels") - } - var r0 []*model.EmailInviteWithError var r1 error if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) ([]*model.EmailInviteWithError, error)); ok { @@ -540,10 +436,6 @@ func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team, func (_m *ServiceInterface) SendLicenseUpForRenewalEmail(_a0 string, name string, locale string, siteURL string, ctaTitle string, ctaLink string, ctaText string, daysToExpiration int) error { ret := _m.Called(_a0, name, locale, siteURL, ctaTitle, ctaLink, ctaText, daysToExpiration) - if len(ret) == 0 { - panic("no return value specified for SendLicenseUpForRenewalEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string, string, string, int) error); ok { r0 = rf(_a0, name, locale, siteURL, ctaTitle, ctaLink, ctaText, daysToExpiration) @@ -558,10 +450,6 @@ func (_m *ServiceInterface) SendLicenseUpForRenewalEmail(_a0 string, name string func (_m *ServiceInterface) SendMailWithEmbeddedFiles(to string, subject string, htmlBody string, embeddedFiles map[string]io.Reader, messageID string, inReplyTo string, references string, category string) error { ret := _m.Called(to, subject, htmlBody, embeddedFiles, messageID, inReplyTo, references, category) - if len(ret) == 0 { - panic("no return value specified for SendMailWithEmbeddedFiles") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, map[string]io.Reader, string, string, string, string) error); ok { r0 = rf(to, subject, htmlBody, embeddedFiles, messageID, inReplyTo, references, category) @@ -576,10 +464,6 @@ func (_m *ServiceInterface) SendMailWithEmbeddedFiles(to string, subject string, func (_m *ServiceInterface) SendMfaChangeEmail(_a0 string, activated bool, locale string, siteURL string) error { ret := _m.Called(_a0, activated, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendMfaChangeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, bool, string, string) error); ok { r0 = rf(_a0, activated, locale, siteURL) @@ -594,10 +478,6 @@ func (_m *ServiceInterface) SendMfaChangeEmail(_a0 string, activated bool, local func (_m *ServiceInterface) SendNoCardPaymentFailedEmail(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendNoCardPaymentFailedEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -612,10 +492,6 @@ func (_m *ServiceInterface) SendNoCardPaymentFailedEmail(_a0 string, locale stri func (_m *ServiceInterface) SendNotificationMail(to string, subject string, htmlBody string) error { ret := _m.Called(to, subject, htmlBody) - if len(ret) == 0 { - panic("no return value specified for SendNotificationMail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(to, subject, htmlBody) @@ -630,10 +506,6 @@ func (_m *ServiceInterface) SendNotificationMail(to string, subject string, html func (_m *ServiceInterface) SendPasswordChangeEmail(_a0 string, method string, locale string, siteURL string) error { ret := _m.Called(_a0, method, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendPasswordChangeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(_a0, method, locale, siteURL) @@ -648,10 +520,6 @@ func (_m *ServiceInterface) SendPasswordChangeEmail(_a0 string, method string, l func (_m *ServiceInterface) SendPasswordResetEmail(_a0 string, token *model.Token, locale string, siteURL string) (bool, error) { ret := _m.Called(_a0, token, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendPasswordResetEmail") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) (bool, error)); ok { @@ -676,10 +544,6 @@ func (_m *ServiceInterface) SendPasswordResetEmail(_a0 string, token *model.Toke func (_m *ServiceInterface) SendPaymentFailedEmail(_a0 string, locale string, failedPayment *model.FailedPayment, planName string, siteURL string) (bool, error) { ret := _m.Called(_a0, locale, failedPayment, planName, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendPaymentFailedEmail") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.FailedPayment, string, string) (bool, error)); ok { @@ -704,10 +568,6 @@ func (_m *ServiceInterface) SendPaymentFailedEmail(_a0 string, locale string, fa func (_m *ServiceInterface) SendRemoveExpiredLicenseEmail(ctaText string, ctaLink string, _a2 string, locale string, siteURL string) error { ret := _m.Called(ctaText, ctaLink, _a2, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendRemoveExpiredLicenseEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { r0 = rf(ctaText, ctaLink, _a2, locale, siteURL) @@ -722,10 +582,6 @@ func (_m *ServiceInterface) SendRemoveExpiredLicenseEmail(ctaText string, ctaLin func (_m *ServiceInterface) SendSignInChangeEmail(_a0 string, method string, locale string, siteURL string) error { ret := _m.Called(_a0, method, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendSignInChangeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(_a0, method, locale, siteURL) @@ -740,10 +596,6 @@ func (_m *ServiceInterface) SendSignInChangeEmail(_a0 string, method string, loc func (_m *ServiceInterface) SendUserAccessTokenAddedEmail(_a0 string, locale string, siteURL string) error { ret := _m.Called(_a0, locale, siteURL) - if len(ret) == 0 { - panic("no return value specified for SendUserAccessTokenAddedEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(_a0, locale, siteURL) @@ -758,10 +610,6 @@ func (_m *ServiceInterface) SendUserAccessTokenAddedEmail(_a0 string, locale str func (_m *ServiceInterface) SendVerifyEmail(userEmail string, locale string, siteURL string, token string, redirect string) error { ret := _m.Called(userEmail, locale, siteURL, token, redirect) - if len(ret) == 0 { - panic("no return value specified for SendVerifyEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { r0 = rf(userEmail, locale, siteURL, token, redirect) @@ -776,10 +624,6 @@ func (_m *ServiceInterface) SendVerifyEmail(userEmail string, locale string, sit func (_m *ServiceInterface) SendWelcomeEmail(userID string, _a1 string, verified bool, disableWelcomeEmail bool, locale string, siteURL string, redirect string) error { ret := _m.Called(userID, _a1, verified, disableWelcomeEmail, locale, siteURL, redirect) - if len(ret) == 0 { - panic("no return value specified for SendWelcomeEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, bool, bool, string, string, string) error); ok { r0 = rf(userID, _a1, verified, disableWelcomeEmail, locale, siteURL, redirect) @@ -800,12 +644,13 @@ func (_m *ServiceInterface) Stop() { _m.Called() } -// NewServiceInterface creates a new instance of ServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewServiceInterface(t interface { +type mockConstructorTestingTNewServiceInterface interface { mock.TestingT Cleanup(func()) -}) *ServiceInterface { +} + +// NewServiceInterface creates a new instance of ServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewServiceInterface(t mockConstructorTestingTNewServiceInterface) *ServiceInterface { mock := &ServiceInterface{} mock.Mock.Test(t) diff --git a/server/channels/app/platform/mocks/SuiteIFace.go b/server/channels/app/platform/mocks/SuiteIFace.go index b8faabdfb1..6bcadc2285 100644 --- a/server/channels/app/platform/mocks/SuiteIFace.go +++ b/server/channels/app/platform/mocks/SuiteIFace.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.32.2. DO NOT EDIT. // Regenerate this file using `make platform-mocks`. @@ -20,10 +20,6 @@ type SuiteIFace struct { func (_m *SuiteIFace) GetSession(token string) (*model.Session, *model.AppError) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for GetSession") - } - var r0 *model.Session var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Session, *model.AppError)); ok { @@ -52,10 +48,6 @@ func (_m *SuiteIFace) GetSession(token string) (*model.Session, *model.AppError) func (_m *SuiteIFace) RolesGrantPermission(roleNames []string, permissionId string) bool { ret := _m.Called(roleNames, permissionId) - if len(ret) == 0 { - panic("no return value specified for RolesGrantPermission") - } - var r0 bool if rf, ok := ret.Get(0).(func([]string, string) bool); ok { r0 = rf(roleNames, permissionId) @@ -70,10 +62,6 @@ func (_m *SuiteIFace) RolesGrantPermission(roleNames []string, permissionId stri func (_m *SuiteIFace) UserCanSeeOtherUser(c request.CTX, userID string, otherUserId string) (bool, *model.AppError) { ret := _m.Called(c, userID, otherUserId) - if len(ret) == 0 { - panic("no return value specified for UserCanSeeOtherUser") - } - var r0 bool var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) (bool, *model.AppError)); ok { diff --git a/server/channels/store/storetest/mocks/AuditStore.go b/server/channels/store/storetest/mocks/AuditStore.go index addeae46fb..63a8d25497 100644 --- a/server/channels/store/storetest/mocks/AuditStore.go +++ b/server/channels/store/storetest/mocks/AuditStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type AuditStore struct { func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits, error) { ret := _m.Called(user_id, offset, limit) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 model.Audits var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.Audits, error)); ok { @@ -48,10 +44,6 @@ func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits, func (_m *AuditStore) PermanentDeleteByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -66,10 +58,6 @@ func (_m *AuditStore) PermanentDeleteByUser(userID string) error { func (_m *AuditStore) Save(audit *model.Audit) error { ret := _m.Called(audit) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Audit) error); ok { r0 = rf(audit) @@ -80,12 +68,13 @@ func (_m *AuditStore) Save(audit *model.Audit) error { return r0 } -// NewAuditStore creates a new instance of AuditStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewAuditStore(t interface { +type mockConstructorTestingTNewAuditStore interface { mock.TestingT Cleanup(func()) -}) *AuditStore { +} + +// NewAuditStore creates a new instance of AuditStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewAuditStore(t mockConstructorTestingTNewAuditStore) *AuditStore { mock := &AuditStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/BotStore.go b/server/channels/store/storetest/mocks/BotStore.go index 83d3a82fd7..da0140e85c 100644 --- a/server/channels/store/storetest/mocks/BotStore.go +++ b/server/channels/store/storetest/mocks/BotStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type BotStore struct { func (_m *BotStore) Get(userID string, includeDeleted bool) (*model.Bot, error) { ret := _m.Called(userID, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Bot var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, error)); ok { @@ -48,10 +44,6 @@ func (_m *BotStore) Get(userID string, includeDeleted bool) (*model.Bot, error) func (_m *BotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.Bot var r1 error if rf, ok := ret.Get(0).(func(*model.BotGetOptions) ([]*model.Bot, error)); ok { @@ -78,10 +70,6 @@ func (_m *BotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) { func (_m *BotStore) PermanentDelete(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -96,10 +84,6 @@ func (_m *BotStore) PermanentDelete(userID string) error { func (_m *BotStore) Save(bot *model.Bot) (*model.Bot, error) { ret := _m.Called(bot) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Bot var r1 error if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, error)); ok { @@ -126,10 +110,6 @@ func (_m *BotStore) Save(bot *model.Bot) (*model.Bot, error) { func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) { ret := _m.Called(bot) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Bot var r1 error if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, error)); ok { @@ -152,12 +132,13 @@ func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) { return r0, r1 } -// NewBotStore creates a new instance of BotStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBotStore(t interface { +type mockConstructorTestingTNewBotStore interface { mock.TestingT Cleanup(func()) -}) *BotStore { +} + +// NewBotStore creates a new instance of BotStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBotStore(t mockConstructorTestingTNewBotStore) *BotStore { mock := &BotStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ChannelBookmarkStore.go b/server/channels/store/storetest/mocks/ChannelBookmarkStore.go index bc1ecb9cf0..231167ce37 100644 --- a/server/channels/store/storetest/mocks/ChannelBookmarkStore.go +++ b/server/channels/store/storetest/mocks/ChannelBookmarkStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type ChannelBookmarkStore struct { func (_m *ChannelBookmarkStore) Delete(bookmarkId string, deleteFile bool) error { ret := _m.Called(bookmarkId, deleteFile) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(bookmarkId, deleteFile) @@ -36,10 +32,6 @@ func (_m *ChannelBookmarkStore) Delete(bookmarkId string, deleteFile bool) error func (_m *ChannelBookmarkStore) ErrorIfBookmarkFileInfoAlreadyAttached(fileId string) error { ret := _m.Called(fileId) - if len(ret) == 0 { - panic("no return value specified for ErrorIfBookmarkFileInfoAlreadyAttached") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(fileId) @@ -54,10 +46,6 @@ func (_m *ChannelBookmarkStore) ErrorIfBookmarkFileInfoAlreadyAttached(fileId st func (_m *ChannelBookmarkStore) Get(Id string, includeDeleted bool) (*model.ChannelBookmarkWithFileInfo, error) { ret := _m.Called(Id, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.ChannelBookmarkWithFileInfo var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.ChannelBookmarkWithFileInfo, error)); ok { @@ -84,10 +72,6 @@ func (_m *ChannelBookmarkStore) Get(Id string, includeDeleted bool) (*model.Chan func (_m *ChannelBookmarkStore) GetBookmarksForChannelSince(channelId string, since int64) ([]*model.ChannelBookmarkWithFileInfo, error) { ret := _m.Called(channelId, since) - if len(ret) == 0 { - panic("no return value specified for GetBookmarksForChannelSince") - } - var r0 []*model.ChannelBookmarkWithFileInfo var r1 error if rf, ok := ret.Get(0).(func(string, int64) ([]*model.ChannelBookmarkWithFileInfo, error)); ok { @@ -114,10 +98,6 @@ func (_m *ChannelBookmarkStore) GetBookmarksForChannelSince(channelId string, si func (_m *ChannelBookmarkStore) Save(bookmark *model.ChannelBookmark, increaseSortOrder bool) (*model.ChannelBookmarkWithFileInfo, error) { ret := _m.Called(bookmark, increaseSortOrder) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.ChannelBookmarkWithFileInfo var r1 error if rf, ok := ret.Get(0).(func(*model.ChannelBookmark, bool) (*model.ChannelBookmarkWithFileInfo, error)); ok { @@ -144,10 +124,6 @@ func (_m *ChannelBookmarkStore) Save(bookmark *model.ChannelBookmark, increaseSo func (_m *ChannelBookmarkStore) Update(bookmark *model.ChannelBookmark) error { ret := _m.Called(bookmark) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.ChannelBookmark) error); ok { r0 = rf(bookmark) @@ -162,10 +138,6 @@ func (_m *ChannelBookmarkStore) Update(bookmark *model.ChannelBookmark) error { func (_m *ChannelBookmarkStore) UpdateSortOrder(bookmarkId string, channelId string, newIndex int64) ([]*model.ChannelBookmarkWithFileInfo, error) { ret := _m.Called(bookmarkId, channelId, newIndex) - if len(ret) == 0 { - panic("no return value specified for UpdateSortOrder") - } - var r0 []*model.ChannelBookmarkWithFileInfo var r1 error if rf, ok := ret.Get(0).(func(string, string, int64) ([]*model.ChannelBookmarkWithFileInfo, error)); ok { @@ -188,12 +160,13 @@ func (_m *ChannelBookmarkStore) UpdateSortOrder(bookmarkId string, channelId str return r0, r1 } -// NewChannelBookmarkStore creates a new instance of ChannelBookmarkStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewChannelBookmarkStore(t interface { +type mockConstructorTestingTNewChannelBookmarkStore interface { mock.TestingT Cleanup(func()) -}) *ChannelBookmarkStore { +} + +// NewChannelBookmarkStore creates a new instance of ChannelBookmarkStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChannelBookmarkStore(t mockConstructorTestingTNewChannelBookmarkStore) *ChannelBookmarkStore { mock := &ChannelBookmarkStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ChannelMemberHistoryStore.go b/server/channels/store/storetest/mocks/ChannelMemberHistoryStore.go index 68139fdb94..14b37d2e71 100644 --- a/server/channels/store/storetest/mocks/ChannelMemberHistoryStore.go +++ b/server/channels/store/storetest/mocks/ChannelMemberHistoryStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type ChannelMemberHistoryStore struct { func (_m *ChannelMemberHistoryStore) DeleteOrphanedRows(limit int) (int64, error) { ret := _m.Called(limit) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanedRows") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int) (int64, error)); ok { @@ -46,10 +42,6 @@ func (_m *ChannelMemberHistoryStore) DeleteOrphanedRows(limit int) (int64, error func (_m *ChannelMemberHistoryStore) GetChannelsLeftSince(userID string, since int64) ([]string, error) { ret := _m.Called(userID, since) - if len(ret) == 0 { - panic("no return value specified for GetChannelsLeftSince") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, int64) ([]string, error)); ok { @@ -76,10 +68,6 @@ func (_m *ChannelMemberHistoryStore) GetChannelsLeftSince(userID string, since i func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelID string) ([]*model.ChannelMemberHistoryResult, error) { ret := _m.Called(startTime, endTime, channelID) - if len(ret) == 0 { - panic("no return value specified for GetUsersInChannelDuring") - } - var r0 []*model.ChannelMemberHistoryResult var r1 error if rf, ok := ret.Get(0).(func(int64, int64, string) ([]*model.ChannelMemberHistoryResult, error)); ok { @@ -106,10 +94,6 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en func (_m *ChannelMemberHistoryStore) LogJoinEvent(userID string, channelID string, joinTime int64) error { ret := _m.Called(userID, channelID, joinTime) - if len(ret) == 0 { - panic("no return value specified for LogJoinEvent") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, int64) error); ok { r0 = rf(userID, channelID, joinTime) @@ -124,10 +108,6 @@ func (_m *ChannelMemberHistoryStore) LogJoinEvent(userID string, channelID strin func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userID string, channelID string, leaveTime int64) error { ret := _m.Called(userID, channelID, leaveTime) - if len(ret) == 0 { - panic("no return value specified for LogLeaveEvent") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, int64) error); ok { r0 = rf(userID, channelID, leaveTime) @@ -142,10 +122,6 @@ func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userID string, channelID stri func (_m *ChannelMemberHistoryStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) { ret := _m.Called(endTime, limit) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatch") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok { @@ -170,10 +146,6 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatch(endTime int64, limit i func (_m *ChannelMemberHistoryStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalPolicyEndTime int64, limit int64, cursor model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error) { ret := _m.Called(now, globalPolicyEndTime, limit, cursor) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatchForRetentionPolicies") - } - var r0 int64 var r1 model.RetentionPolicyCursor var r2 error @@ -201,12 +173,13 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatchForRetentionPolicies(no return r0, r1, r2 } -// NewChannelMemberHistoryStore creates a new instance of ChannelMemberHistoryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewChannelMemberHistoryStore(t interface { +type mockConstructorTestingTNewChannelMemberHistoryStore interface { mock.TestingT Cleanup(func()) -}) *ChannelMemberHistoryStore { +} + +// NewChannelMemberHistoryStore creates a new instance of ChannelMemberHistoryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChannelMemberHistoryStore(t mockConstructorTestingTNewChannelMemberHistoryStore) *ChannelMemberHistoryStore { mock := &ChannelMemberHistoryStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ChannelStore.go b/server/channels/store/storetest/mocks/ChannelStore.go index d31c350637..a2fa85bbc0 100644 --- a/server/channels/store/storetest/mocks/ChannelStore.go +++ b/server/channels/store/storetest/mocks/ChannelStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,10 +24,6 @@ type ChannelStore struct { func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamID string, channelType model.ChannelType) (int64, error) { ret := _m.Called(teamID, channelType) - if len(ret) == 0 { - panic("no return value specified for AnalyticsDeletedTypeCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, model.ChannelType) (int64, error)); ok { @@ -52,10 +48,6 @@ func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamID string, channelType mod func (_m *ChannelStore) AnalyticsTypeCount(teamID string, channelType model.ChannelType) (int64, error) { ret := _m.Called(teamID, channelType) - if len(ret) == 0 { - panic("no return value specified for AnalyticsTypeCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, model.ChannelType) (int64, error)); ok { @@ -80,10 +72,6 @@ func (_m *ChannelStore) AnalyticsTypeCount(teamID string, channelType model.Chan func (_m *ChannelStore) Autocomplete(rctx request.CTX, userID string, term string, includeDeleted bool, isGuest bool) (model.ChannelListWithTeamData, error) { ret := _m.Called(rctx, userID, term, includeDeleted, isGuest) - if len(ret) == 0 { - panic("no return value specified for Autocomplete") - } - var r0 model.ChannelListWithTeamData var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, bool, bool) (model.ChannelListWithTeamData, error)); ok { @@ -110,10 +98,6 @@ func (_m *ChannelStore) Autocomplete(rctx request.CTX, userID string, term strin func (_m *ChannelStore) AutocompleteInTeam(rctx request.CTX, teamID string, userID string, term string, includeDeleted bool, isGuest bool) (model.ChannelList, error) { ret := _m.Called(rctx, teamID, userID, term, includeDeleted, isGuest) - if len(ret) == 0 { - panic("no return value specified for AutocompleteInTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, bool, bool) (model.ChannelList, error)); ok { @@ -140,10 +124,6 @@ func (_m *ChannelStore) AutocompleteInTeam(rctx request.CTX, teamID string, user func (_m *ChannelStore) AutocompleteInTeamForSearch(teamID string, userID string, term string, includeDeleted bool) (model.ChannelList, error) { ret := _m.Called(teamID, userID, term, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for AutocompleteInTeamForSearch") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, string, bool) (model.ChannelList, error)); ok { @@ -170,10 +150,6 @@ func (_m *ChannelStore) AutocompleteInTeamForSearch(teamID string, userID string func (_m *ChannelStore) ClearAllCustomRoleAssignments() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ClearAllCustomRoleAssignments") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -198,10 +174,6 @@ func (_m *ChannelStore) ClearMembersForUserCache() { func (_m *ChannelStore) ClearSidebarOnTeamLeave(userID string, teamID string) error { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for ClearSidebarOnTeamLeave") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, teamID) @@ -216,10 +188,6 @@ func (_m *ChannelStore) ClearSidebarOnTeamLeave(userID string, teamID string) er func (_m *ChannelStore) CountPostsAfter(channelID string, timestamp int64, excludedUserID string) (int, int, error) { ret := _m.Called(channelID, timestamp, excludedUserID) - if len(ret) == 0 { - panic("no return value specified for CountPostsAfter") - } - var r0 int var r1 int var r2 error @@ -251,10 +219,6 @@ func (_m *ChannelStore) CountPostsAfter(channelID string, timestamp int64, exclu func (_m *ChannelStore) CountUrgentPostsAfter(channelID string, timestamp int64, excludedUserID string) (int, error) { ret := _m.Called(channelID, timestamp, excludedUserID) - if len(ret) == 0 { - panic("no return value specified for CountUrgentPostsAfter") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, int64, string) (int, error)); ok { @@ -286,10 +250,6 @@ func (_m *ChannelStore) CreateDirectChannel(ctx request.CTX, userID *model.User, _ca = append(_ca, _va...) ret := _m.Called(_ca...) - if len(ret) == 0 { - panic("no return value specified for CreateDirectChannel") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.User, ...model.ChannelOption) (*model.Channel, error)); ok { @@ -316,10 +276,6 @@ func (_m *ChannelStore) CreateDirectChannel(ctx request.CTX, userID *model.User, func (_m *ChannelStore) CreateInitialSidebarCategories(c request.CTX, userID string, opts *store.SidebarCategorySearchOpts) (*model.OrderedSidebarCategories, error) { ret := _m.Called(c, userID, opts) - if len(ret) == 0 { - panic("no return value specified for CreateInitialSidebarCategories") - } - var r0 *model.OrderedSidebarCategories var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, *store.SidebarCategorySearchOpts) (*model.OrderedSidebarCategories, error)); ok { @@ -346,10 +302,6 @@ func (_m *ChannelStore) CreateInitialSidebarCategories(c request.CTX, userID str func (_m *ChannelStore) CreateSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) { ret := _m.Called(userID, teamID, newCategory) - if len(ret) == 0 { - panic("no return value specified for CreateSidebarCategory") - } - var r0 *model.SidebarCategoryWithChannels var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error)); ok { @@ -376,10 +328,6 @@ func (_m *ChannelStore) CreateSidebarCategory(userID string, teamID string, newC func (_m *ChannelStore) Delete(channelID string, timestamp int64) error { ret := _m.Called(channelID, timestamp) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(channelID, timestamp) @@ -394,10 +342,6 @@ func (_m *ChannelStore) Delete(channelID string, timestamp int64) error { func (_m *ChannelStore) DeleteAllSidebarChannelForChannel(channelID string) error { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for DeleteAllSidebarChannelForChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(channelID) @@ -412,10 +356,6 @@ func (_m *ChannelStore) DeleteAllSidebarChannelForChannel(channelID string) erro func (_m *ChannelStore) DeleteSidebarCategory(categoryID string) error { ret := _m.Called(categoryID) - if len(ret) == 0 { - panic("no return value specified for DeleteSidebarCategory") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(categoryID) @@ -430,10 +370,6 @@ func (_m *ChannelStore) DeleteSidebarCategory(categoryID string) error { func (_m *ChannelStore) DeleteSidebarChannelsByPreferences(preferences model.Preferences) error { ret := _m.Called(preferences) - if len(ret) == 0 { - panic("no return value specified for DeleteSidebarChannelsByPreferences") - } - var r0 error if rf, ok := ret.Get(0).(func(model.Preferences) error); ok { r0 = rf(preferences) @@ -448,10 +384,6 @@ func (_m *ChannelStore) DeleteSidebarChannelsByPreferences(preferences model.Pre func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, error) { ret := _m.Called(id, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.Channel, error)); ok { @@ -478,10 +410,6 @@ func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, err func (_m *ChannelStore) GetAll(teamID string) ([]*model.Channel, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.Channel var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Channel, error)); ok { @@ -508,10 +436,6 @@ func (_m *ChannelStore) GetAll(teamID string) ([]*model.Channel, error) { func (_m *ChannelStore) GetAllChannelMemberIdsByChannelId(id string) ([]string, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetAllChannelMemberIdsByChannelId") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -538,10 +462,6 @@ func (_m *ChannelStore) GetAllChannelMemberIdsByChannelId(id string) ([]string, func (_m *ChannelStore) GetAllChannelMembersForUser(userID string, allowFromCache bool, includeDeleted bool) (map[string]string, error) { ret := _m.Called(userID, allowFromCache, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetAllChannelMembersForUser") - } - var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func(string, bool, bool) (map[string]string, error)); ok { @@ -568,10 +488,6 @@ func (_m *ChannelStore) GetAllChannelMembersForUser(userID string, allowFromCach func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelID string, allowFromCache bool) (map[string]model.StringMap, error) { ret := _m.Called(channelID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetAllChannelMembersNotifyPropsForChannel") - } - var r0 map[string]model.StringMap var r1 error if rf, ok := ret.Get(0).(func(string, bool) (map[string]model.StringMap, error)); ok { @@ -598,10 +514,6 @@ func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelID stri func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (model.ChannelListWithTeamData, error) { ret := _m.Called(page, perPage, opts) - if len(ret) == 0 { - panic("no return value specified for GetAllChannels") - } - var r0 model.ChannelListWithTeamData var r1 error if rf, ok := ret.Get(0).(func(int, int, store.ChannelSearchOpts) (model.ChannelListWithTeamData, error)); ok { @@ -628,10 +540,6 @@ func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.Channel func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for GetAllChannelsCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(store.ChannelSearchOpts) (int64, error)); ok { @@ -656,10 +564,6 @@ func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64 func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterID string) ([]*model.ChannelForExport, error) { ret := _m.Called(limit, afterID) - if len(ret) == 0 { - panic("no return value specified for GetAllChannelsForExportAfter") - } - var r0 []*model.ChannelForExport var r1 error if rf, ok := ret.Get(0).(func(int, string) ([]*model.ChannelForExport, error)); ok { @@ -686,10 +590,6 @@ func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterID string) func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterID string, includeArchivedChannels bool) ([]*model.DirectChannelForExport, error) { ret := _m.Called(limit, afterID, includeArchivedChannels) - if len(ret) == 0 { - panic("no return value specified for GetAllDirectChannelsForExportAfter") - } - var r0 []*model.DirectChannelForExport var r1 error if rf, ok := ret.Get(0).(func(int, string, bool) ([]*model.DirectChannelForExport, error)); ok { @@ -716,10 +616,6 @@ func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterID st func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) { ret := _m.Called(team_id, name, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, error)); ok { @@ -746,10 +642,6 @@ func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bo func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error) { ret := _m.Called(team_id, name, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetByNameIncludeDeleted") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, error)); ok { @@ -776,10 +668,6 @@ func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, all func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) { ret := _m.Called(team_id, names, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetByNames") - } - var r0 []*model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, []string, bool) ([]*model.Channel, error)); ok { @@ -806,10 +694,6 @@ func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCach func (_m *ChannelStore) GetByNamesIncludeDeleted(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) { ret := _m.Called(team_id, names, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetByNamesIncludeDeleted") - } - var r0 []*model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, []string, bool) ([]*model.Channel, error)); ok { @@ -836,10 +720,6 @@ func (_m *ChannelStore) GetByNamesIncludeDeleted(team_id string, names []string, func (_m *ChannelStore) GetChannelCounts(teamID string, userID string) (*model.ChannelCounts, error) { ret := _m.Called(teamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelCounts") - } - var r0 *model.ChannelCounts var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelCounts, error)); ok { @@ -866,10 +746,6 @@ func (_m *ChannelStore) GetChannelCounts(teamID string, userID string) (*model.C func (_m *ChannelStore) GetChannelMembersForExport(userID string, teamID string, includeArchivedChannel bool) ([]*model.ChannelMemberForExport, error) { ret := _m.Called(userID, teamID, includeArchivedChannel) - if len(ret) == 0 { - panic("no return value specified for GetChannelMembersForExport") - } - var r0 []*model.ChannelMemberForExport var r1 error if rf, ok := ret.Get(0).(func(string, string, bool) ([]*model.ChannelMemberForExport, error)); ok { @@ -896,10 +772,6 @@ func (_m *ChannelStore) GetChannelMembersForExport(userID string, teamID string, func (_m *ChannelStore) GetChannelMembersTimezones(channelID string) ([]model.StringMap, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetChannelMembersTimezones") - } - var r0 []model.StringMap var r1 error if rf, ok := ret.Get(0).(func(string) ([]model.StringMap, error)); ok { @@ -926,10 +798,6 @@ func (_m *ChannelStore) GetChannelMembersTimezones(channelID string) ([]model.St func (_m *ChannelStore) GetChannelUnread(channelID string, userID string) (*model.ChannelUnread, error) { ret := _m.Called(channelID, userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelUnread") - } - var r0 *model.ChannelUnread var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelUnread, error)); ok { @@ -956,10 +824,6 @@ func (_m *ChannelStore) GetChannelUnread(channelID string, userID string) (*mode func (_m *ChannelStore) GetChannels(teamID string, userID string, opts *model.ChannelSearchOpts) (model.ChannelList, error) { ret := _m.Called(teamID, userID, opts) - if len(ret) == 0 { - panic("no return value specified for GetChannels") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.ChannelSearchOpts) (model.ChannelList, error)); ok { @@ -986,10 +850,6 @@ func (_m *ChannelStore) GetChannels(teamID string, userID string, opts *model.Ch func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, startChannelID string, limit int) ([]*model.Channel, error) { ret := _m.Called(startTime, startChannelID, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannelsBatchForIndexing") - } - var r0 []*model.Channel var r1 error if rf, ok := ret.Get(0).(func(int64, string, int) ([]*model.Channel, error)); ok { @@ -1016,10 +876,6 @@ func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, startChanne func (_m *ChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, error) { ret := _m.Called(channelIds, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetChannelsByIds") - } - var r0 []*model.Channel var r1 error if rf, ok := ret.Get(0).(func([]string, bool) ([]*model.Channel, error)); ok { @@ -1046,10 +902,6 @@ func (_m *ChannelStore) GetChannelsByIds(channelIds []string, includeDeleted boo func (_m *ChannelStore) GetChannelsByScheme(schemeID string, offset int, limit int) (model.ChannelList, error) { ret := _m.Called(schemeID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannelsByScheme") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelList, error)); ok { @@ -1076,10 +928,6 @@ func (_m *ChannelStore) GetChannelsByScheme(schemeID string, offset int, limit i func (_m *ChannelStore) GetChannelsByUser(userID string, includeDeleted bool, lastDeleteAt int, pageSize int, fromChannelID string) (model.ChannelList, error) { ret := _m.Called(userID, includeDeleted, lastDeleteAt, pageSize, fromChannelID) - if len(ret) == 0 { - panic("no return value specified for GetChannelsByUser") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, bool, int, int, string) (model.ChannelList, error)); ok { @@ -1106,10 +954,6 @@ func (_m *ChannelStore) GetChannelsByUser(userID string, includeDeleted bool, la func (_m *ChannelStore) GetChannelsMemberCount(channelIDs []string) (map[string]int64, error) { ret := _m.Called(channelIDs) - if len(ret) == 0 { - panic("no return value specified for GetChannelsMemberCount") - } - var r0 map[string]int64 var r1 error if rf, ok := ret.Get(0).(func([]string) (map[string]int64, error)); ok { @@ -1136,10 +980,6 @@ func (_m *ChannelStore) GetChannelsMemberCount(channelIDs []string) (map[string] func (_m *ChannelStore) GetChannelsWithTeamDataByIds(channelIds []string, includeDeleted bool) ([]*model.ChannelWithTeamData, error) { ret := _m.Called(channelIds, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetChannelsWithTeamDataByIds") - } - var r0 []*model.ChannelWithTeamData var r1 error if rf, ok := ret.Get(0).(func([]string, bool) ([]*model.ChannelWithTeamData, error)); ok { @@ -1166,10 +1006,6 @@ func (_m *ChannelStore) GetChannelsWithTeamDataByIds(channelIds []string, includ func (_m *ChannelStore) GetChannelsWithUnreadsAndWithMentions(ctx context.Context, channelIDs []string, userID string, userNotifyProps model.StringMap) ([]string, []string, map[string]int64, error) { ret := _m.Called(ctx, channelIDs, userID, userNotifyProps) - if len(ret) == 0 { - panic("no return value specified for GetChannelsWithUnreadsAndWithMentions") - } - var r0 []string var r1 []string var r2 map[string]int64 @@ -1214,10 +1050,6 @@ func (_m *ChannelStore) GetChannelsWithUnreadsAndWithMentions(ctx context.Contex func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userID string) (model.ChannelList, error) { ret := _m.Called(team_id, offset, limit, userID) - if len(ret) == 0 { - panic("no return value specified for GetDeleted") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, int, int, string) (model.ChannelList, error)); ok { @@ -1244,10 +1076,6 @@ func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userID func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, error) { ret := _m.Called(team_id, name) - if len(ret) == 0 { - panic("no return value specified for GetDeletedByName") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Channel, error)); ok { @@ -1274,10 +1102,6 @@ func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Ch func (_m *ChannelStore) GetFileCount(channelID string) (int64, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetFileCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -1302,10 +1126,6 @@ func (_m *ChannelStore) GetFileCount(channelID string) (int64, error) { func (_m *ChannelStore) GetForPost(postID string) (*model.Channel, error) { ret := _m.Called(postID) - if len(ret) == 0 { - panic("no return value specified for GetForPost") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Channel, error)); ok { @@ -1332,10 +1152,6 @@ func (_m *ChannelStore) GetForPost(postID string) (*model.Channel, error) { func (_m *ChannelStore) GetGuestCount(channelID string, allowFromCache bool) (int64, error) { ret := _m.Called(channelID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetGuestCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, bool) (int64, error)); ok { @@ -1360,10 +1176,6 @@ func (_m *ChannelStore) GetGuestCount(channelID string, allowFromCache bool) (in func (_m *ChannelStore) GetMany(ids []string, allowFromCache bool) (model.ChannelList, error) { ret := _m.Called(ids, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetMany") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func([]string, bool) (model.ChannelList, error)); ok { @@ -1390,10 +1202,6 @@ func (_m *ChannelStore) GetMany(ids []string, allowFromCache bool) (model.Channe func (_m *ChannelStore) GetMember(ctx context.Context, channelID string, userID string) (*model.ChannelMember, error) { ret := _m.Called(ctx, channelID, userID) - if len(ret) == 0 { - panic("no return value specified for GetMember") - } - var r0 *model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*model.ChannelMember, error)); ok { @@ -1420,10 +1228,6 @@ func (_m *ChannelStore) GetMember(ctx context.Context, channelID string, userID func (_m *ChannelStore) GetMemberCount(channelID string, allowFromCache bool) (int64, error) { ret := _m.Called(channelID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, bool) (int64, error)); ok { @@ -1448,10 +1252,6 @@ func (_m *ChannelStore) GetMemberCount(channelID string, allowFromCache bool) (i func (_m *ChannelStore) GetMemberCountFromCache(channelID string) int64 { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetMemberCountFromCache") - } - var r0 int64 if rf, ok := ret.Get(0).(func(string) int64); ok { r0 = rf(channelID) @@ -1466,10 +1266,6 @@ func (_m *ChannelStore) GetMemberCountFromCache(channelID string) int64 { func (_m *ChannelStore) GetMemberCountsByGroup(ctx context.Context, channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error) { ret := _m.Called(ctx, channelID, includeTimezones) - if len(ret) == 0 { - panic("no return value specified for GetMemberCountsByGroup") - } - var r0 []*model.ChannelMemberCountByGroup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool) ([]*model.ChannelMemberCountByGroup, error)); ok { @@ -1496,10 +1292,6 @@ func (_m *ChannelStore) GetMemberCountsByGroup(ctx context.Context, channelID st func (_m *ChannelStore) GetMemberForPost(postID string, userID string, includeArchivedChannels bool) (*model.ChannelMember, error) { ret := _m.Called(postID, userID, includeArchivedChannels) - if len(ret) == 0 { - panic("no return value specified for GetMemberForPost") - } - var r0 *model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(string, string, bool) (*model.ChannelMember, error)); ok { @@ -1526,10 +1318,6 @@ func (_m *ChannelStore) GetMemberForPost(postID string, userID string, includeAr func (_m *ChannelStore) GetMemberLastViewedAt(ctx context.Context, channelID string, userID string) (int64, error) { ret := _m.Called(ctx, channelID, userID) - if len(ret) == 0 { - panic("no return value specified for GetMemberLastViewedAt") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (int64, error)); ok { @@ -1554,10 +1342,6 @@ func (_m *ChannelStore) GetMemberLastViewedAt(ctx context.Context, channelID str func (_m *ChannelStore) GetMembers(channelID string, offset int, limit int) (model.ChannelMembers, error) { ret := _m.Called(channelID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetMembers") - } - var r0 model.ChannelMembers var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelMembers, error)); ok { @@ -1584,10 +1368,6 @@ func (_m *ChannelStore) GetMembers(channelID string, offset int, limit int) (mod func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userID string) (model.ChannelMembers, error) { ret := _m.Called(channelIds, userID) - if len(ret) == 0 { - panic("no return value specified for GetMembersByChannelIds") - } - var r0 model.ChannelMembers var r1 error if rf, ok := ret.Get(0).(func([]string, string) (model.ChannelMembers, error)); ok { @@ -1614,10 +1394,6 @@ func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userID strin func (_m *ChannelStore) GetMembersByIds(channelID string, userIds []string) (model.ChannelMembers, error) { ret := _m.Called(channelID, userIds) - if len(ret) == 0 { - panic("no return value specified for GetMembersByIds") - } - var r0 model.ChannelMembers var r1 error if rf, ok := ret.Get(0).(func(string, []string) (model.ChannelMembers, error)); ok { @@ -1644,10 +1420,6 @@ func (_m *ChannelStore) GetMembersByIds(channelID string, userIds []string) (mod func (_m *ChannelStore) GetMembersForUser(teamID string, userID string) (model.ChannelMembers, error) { ret := _m.Called(teamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetMembersForUser") - } - var r0 model.ChannelMembers var r1 error if rf, ok := ret.Get(0).(func(string, string) (model.ChannelMembers, error)); ok { @@ -1674,10 +1446,6 @@ func (_m *ChannelStore) GetMembersForUser(teamID string, userID string) (model.C func (_m *ChannelStore) GetMembersForUserWithPagination(userID string, page int, perPage int) (model.ChannelMembersWithTeamData, error) { ret := _m.Called(userID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetMembersForUserWithPagination") - } - var r0 model.ChannelMembersWithTeamData var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelMembersWithTeamData, error)); ok { @@ -1704,10 +1472,6 @@ func (_m *ChannelStore) GetMembersForUserWithPagination(userID string, page int, func (_m *ChannelStore) GetMembersInfoByChannelIds(channelIDs []string) (map[string][]*model.User, error) { ret := _m.Called(channelIDs) - if len(ret) == 0 { - panic("no return value specified for GetMembersInfoByChannelIds") - } - var r0 map[string][]*model.User var r1 error if rf, ok := ret.Get(0).(func([]string) (map[string][]*model.User, error)); ok { @@ -1734,10 +1498,6 @@ func (_m *ChannelStore) GetMembersInfoByChannelIds(channelIDs []string) (map[str func (_m *ChannelStore) GetMoreChannels(teamID string, userID string, offset int, limit int) (model.ChannelList, error) { ret := _m.Called(teamID, userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetMoreChannels") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) (model.ChannelList, error)); ok { @@ -1764,10 +1524,6 @@ func (_m *ChannelStore) GetMoreChannels(teamID string, userID string, offset int func (_m *ChannelStore) GetPinnedPostCount(channelID string, allowFromCache bool) (int64, error) { ret := _m.Called(channelID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetPinnedPostCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, bool) (int64, error)); ok { @@ -1792,10 +1548,6 @@ func (_m *ChannelStore) GetPinnedPostCount(channelID string, allowFromCache bool func (_m *ChannelStore) GetPinnedPosts(channelID string) (*model.PostList, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetPinnedPosts") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(string) (*model.PostList, error)); ok { @@ -1822,10 +1574,6 @@ func (_m *ChannelStore) GetPinnedPosts(channelID string) (*model.PostList, error func (_m *ChannelStore) GetPrivateChannelsForTeam(teamID string, offset int, limit int) (model.ChannelList, error) { ret := _m.Called(teamID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetPrivateChannelsForTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelList, error)); ok { @@ -1852,10 +1600,6 @@ func (_m *ChannelStore) GetPrivateChannelsForTeam(teamID string, offset int, lim func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamID string, channelIds []string) (model.ChannelList, error) { ret := _m.Called(teamID, channelIds) - if len(ret) == 0 { - panic("no return value specified for GetPublicChannelsByIdsForTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, []string) (model.ChannelList, error)); ok { @@ -1882,10 +1626,6 @@ func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamID string, channelIds func (_m *ChannelStore) GetPublicChannelsForTeam(teamID string, offset int, limit int) (model.ChannelList, error) { ret := _m.Called(teamID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetPublicChannelsForTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelList, error)); ok { @@ -1912,10 +1652,6 @@ func (_m *ChannelStore) GetPublicChannelsForTeam(teamID string, offset int, limi func (_m *ChannelStore) GetSidebarCategories(userID string, opts *store.SidebarCategorySearchOpts) (*model.OrderedSidebarCategories, error) { ret := _m.Called(userID, opts) - if len(ret) == 0 { - panic("no return value specified for GetSidebarCategories") - } - var r0 *model.OrderedSidebarCategories var r1 error if rf, ok := ret.Get(0).(func(string, *store.SidebarCategorySearchOpts) (*model.OrderedSidebarCategories, error)); ok { @@ -1942,10 +1678,6 @@ func (_m *ChannelStore) GetSidebarCategories(userID string, opts *store.SidebarC func (_m *ChannelStore) GetSidebarCategoriesForTeamForUser(userID string, teamID string) (*model.OrderedSidebarCategories, error) { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for GetSidebarCategoriesForTeamForUser") - } - var r0 *model.OrderedSidebarCategories var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.OrderedSidebarCategories, error)); ok { @@ -1972,10 +1704,6 @@ func (_m *ChannelStore) GetSidebarCategoriesForTeamForUser(userID string, teamID func (_m *ChannelStore) GetSidebarCategory(categoryID string) (*model.SidebarCategoryWithChannels, error) { ret := _m.Called(categoryID) - if len(ret) == 0 { - panic("no return value specified for GetSidebarCategory") - } - var r0 *model.SidebarCategoryWithChannels var r1 error if rf, ok := ret.Get(0).(func(string) (*model.SidebarCategoryWithChannels, error)); ok { @@ -2002,10 +1730,6 @@ func (_m *ChannelStore) GetSidebarCategory(categoryID string) (*model.SidebarCat func (_m *ChannelStore) GetSidebarCategoryOrder(userID string, teamID string) ([]string, error) { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for GetSidebarCategoryOrder") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok { @@ -2032,10 +1756,6 @@ func (_m *ChannelStore) GetSidebarCategoryOrder(userID string, teamID string) ([ func (_m *ChannelStore) GetTeamChannels(teamID string) (model.ChannelList, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetTeamChannels") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string) (model.ChannelList, error)); ok { @@ -2062,10 +1782,6 @@ func (_m *ChannelStore) GetTeamChannels(teamID string) (model.ChannelList, error func (_m *ChannelStore) GetTeamForChannel(channelID string) (*model.Team, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetTeamForChannel") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok { @@ -2092,10 +1808,6 @@ func (_m *ChannelStore) GetTeamForChannel(channelID string) (*model.Team, error) func (_m *ChannelStore) GetTeamMembersForChannel(channelID string) ([]string, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetTeamMembersForChannel") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -2122,10 +1834,6 @@ func (_m *ChannelStore) GetTeamMembersForChannel(channelID string) ([]string, er func (_m *ChannelStore) GroupSyncedChannelCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupSyncedChannelCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -2150,10 +1858,6 @@ func (_m *ChannelStore) GroupSyncedChannelCount() (int64, error) { func (_m *ChannelStore) IncrementMentionCount(channelID string, userIDs []string, isRoot bool, isUrgent bool) error { ret := _m.Called(channelID, userIDs, isRoot, isUrgent) - if len(ret) == 0 { - panic("no return value specified for IncrementMentionCount") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string, bool, bool) error); ok { r0 = rf(channelID, userIDs, isRoot, isUrgent) @@ -2203,10 +1907,6 @@ func (_m *ChannelStore) InvalidatePinnedPostCount(channelID string) { func (_m *ChannelStore) MigrateChannelMembers(fromChannelID string, fromUserID string) (map[string]string, error) { ret := _m.Called(fromChannelID, fromUserID) - if len(ret) == 0 { - panic("no return value specified for MigrateChannelMembers") - } - var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func(string, string) (map[string]string, error)); ok { @@ -2233,10 +1933,6 @@ func (_m *ChannelStore) MigrateChannelMembers(fromChannelID string, fromUserID s func (_m *ChannelStore) PatchMultipleMembersNotifyProps(members []*model.ChannelMemberIdentifier, notifyProps map[string]string) ([]*model.ChannelMember, error) { ret := _m.Called(members, notifyProps) - if len(ret) == 0 { - panic("no return value specified for PatchMultipleMembersNotifyProps") - } - var r0 []*model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func([]*model.ChannelMemberIdentifier, map[string]string) ([]*model.ChannelMember, error)); ok { @@ -2263,10 +1959,6 @@ func (_m *ChannelStore) PatchMultipleMembersNotifyProps(members []*model.Channel func (_m *ChannelStore) PermanentDelete(ctx request.CTX, channelID string) error { ret := _m.Called(ctx, channelID) - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(ctx, channelID) @@ -2281,10 +1973,6 @@ func (_m *ChannelStore) PermanentDelete(ctx request.CTX, channelID string) error func (_m *ChannelStore) PermanentDeleteByTeam(teamID string) error { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByTeam") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(teamID) @@ -2299,10 +1987,6 @@ func (_m *ChannelStore) PermanentDeleteByTeam(teamID string) error { func (_m *ChannelStore) PermanentDeleteMembersByChannel(ctx request.CTX, channelID string) error { ret := _m.Called(ctx, channelID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteMembersByChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(ctx, channelID) @@ -2317,10 +2001,6 @@ func (_m *ChannelStore) PermanentDeleteMembersByChannel(ctx request.CTX, channel func (_m *ChannelStore) PermanentDeleteMembersByUser(ctx request.CTX, userID string) error { ret := _m.Called(ctx, userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteMembersByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(ctx, userID) @@ -2335,10 +2015,6 @@ func (_m *ChannelStore) PermanentDeleteMembersByUser(ctx request.CTX, userID str func (_m *ChannelStore) RemoveAllDeactivatedMembers(ctx request.CTX, channelID string) error { ret := _m.Called(ctx, channelID) - if len(ret) == 0 { - panic("no return value specified for RemoveAllDeactivatedMembers") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(ctx, channelID) @@ -2353,10 +2029,6 @@ func (_m *ChannelStore) RemoveAllDeactivatedMembers(ctx request.CTX, channelID s func (_m *ChannelStore) RemoveMember(ctx request.CTX, channelID string, userID string) error { ret := _m.Called(ctx, channelID, userID) - if len(ret) == 0 { - panic("no return value specified for RemoveMember") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, string) error); ok { r0 = rf(ctx, channelID, userID) @@ -2371,10 +2043,6 @@ func (_m *ChannelStore) RemoveMember(ctx request.CTX, channelID string, userID s func (_m *ChannelStore) RemoveMembers(ctx request.CTX, channelID string, userIds []string) error { ret := _m.Called(ctx, channelID, userIds) - if len(ret) == 0 { - panic("no return value specified for RemoveMembers") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, []string) error); ok { r0 = rf(ctx, channelID, userIds) @@ -2389,10 +2057,6 @@ func (_m *ChannelStore) RemoveMembers(ctx request.CTX, channelID string, userIds func (_m *ChannelStore) ResetAllChannelSchemes() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ResetAllChannelSchemes") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -2407,10 +2071,6 @@ func (_m *ChannelStore) ResetAllChannelSchemes() error { func (_m *ChannelStore) Restore(channelID string, timestamp int64) error { ret := _m.Called(channelID, timestamp) - if len(ret) == 0 { - panic("no return value specified for Restore") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(channelID, timestamp) @@ -2425,10 +2085,6 @@ func (_m *ChannelStore) Restore(channelID string, timestamp int64) error { func (_m *ChannelStore) Save(rctx request.CTX, channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) { ret := _m.Called(rctx, channel, maxChannelsPerTeam) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, int64) (*model.Channel, error)); ok { @@ -2455,10 +2111,6 @@ func (_m *ChannelStore) Save(rctx request.CTX, channel *model.Channel, maxChanne func (_m *ChannelStore) SaveDirectChannel(ctx request.CTX, channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error) { ret := _m.Called(ctx, channel, member1, member2) - if len(ret) == 0 { - panic("no return value specified for SaveDirectChannel") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, *model.ChannelMember, *model.ChannelMember) (*model.Channel, error)); ok { @@ -2485,10 +2137,6 @@ func (_m *ChannelStore) SaveDirectChannel(ctx request.CTX, channel *model.Channe func (_m *ChannelStore) SaveMember(rctx request.CTX, member *model.ChannelMember) (*model.ChannelMember, error) { ret := _m.Called(rctx, member) - if len(ret) == 0 { - panic("no return value specified for SaveMember") - } - var r0 *model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.ChannelMember) (*model.ChannelMember, error)); ok { @@ -2515,10 +2163,6 @@ func (_m *ChannelStore) SaveMember(rctx request.CTX, member *model.ChannelMember func (_m *ChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) { ret := _m.Called(members) - if len(ret) == 0 { - panic("no return value specified for SaveMultipleMembers") - } - var r0 []*model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func([]*model.ChannelMember) ([]*model.ChannelMember, error)); ok { @@ -2545,10 +2189,6 @@ func (_m *ChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]* func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (model.ChannelListWithTeamData, int64, error) { ret := _m.Called(term, opts) - if len(ret) == 0 { - panic("no return value specified for SearchAllChannels") - } - var r0 model.ChannelListWithTeamData var r1 int64 var r2 error @@ -2582,10 +2222,6 @@ func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchO func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userID string) (model.ChannelList, error) { ret := _m.Called(teamID, term, userID) - if len(ret) == 0 { - panic("no return value specified for SearchArchivedInTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (model.ChannelList, error)); ok { @@ -2612,10 +2248,6 @@ func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userID func (_m *ChannelStore) SearchForUserInTeam(userID string, teamID string, term string, includeDeleted bool) (model.ChannelList, error) { ret := _m.Called(userID, teamID, term, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for SearchForUserInTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, string, bool) (model.ChannelList, error)); ok { @@ -2642,10 +2274,6 @@ func (_m *ChannelStore) SearchForUserInTeam(userID string, teamID string, term s func (_m *ChannelStore) SearchGroupChannels(userID string, term string) (model.ChannelList, error) { ret := _m.Called(userID, term) - if len(ret) == 0 { - panic("no return value specified for SearchGroupChannels") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string) (model.ChannelList, error)); ok { @@ -2672,10 +2300,6 @@ func (_m *ChannelStore) SearchGroupChannels(userID string, term string) (model.C func (_m *ChannelStore) SearchInTeam(teamID string, term string, includeDeleted bool) (model.ChannelList, error) { ret := _m.Called(teamID, term, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for SearchInTeam") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, bool) (model.ChannelList, error)); ok { @@ -2702,10 +2326,6 @@ func (_m *ChannelStore) SearchInTeam(teamID string, term string, includeDeleted func (_m *ChannelStore) SearchMore(userID string, teamID string, term string) (model.ChannelList, error) { ret := _m.Called(userID, teamID, term) - if len(ret) == 0 { - panic("no return value specified for SearchMore") - } - var r0 model.ChannelList var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (model.ChannelList, error)); ok { @@ -2732,10 +2352,6 @@ func (_m *ChannelStore) SearchMore(userID string, teamID string, term string) (m func (_m *ChannelStore) SetDeleteAt(channelID string, deleteAt int64, updateAt int64) error { ret := _m.Called(channelID, deleteAt, updateAt) - if len(ret) == 0 { - panic("no return value specified for SetDeleteAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64, int64) error); ok { r0 = rf(channelID, deleteAt, updateAt) @@ -2750,10 +2366,6 @@ func (_m *ChannelStore) SetDeleteAt(channelID string, deleteAt int64, updateAt i func (_m *ChannelStore) SetShared(channelId string, shared bool) error { ret := _m.Called(channelId, shared) - if len(ret) == 0 { - panic("no return value specified for SetShared") - } - var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(channelId, shared) @@ -2768,10 +2380,6 @@ func (_m *ChannelStore) SetShared(channelId string, shared bool) error { func (_m *ChannelStore) Update(ctx request.CTX, channel *model.Channel) (*model.Channel, error) { ret := _m.Called(ctx, channel) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Channel var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel) (*model.Channel, error)); ok { @@ -2798,10 +2406,6 @@ func (_m *ChannelStore) Update(ctx request.CTX, channel *model.Channel) (*model. func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userID string) (map[string]int64, error) { ret := _m.Called(channelIds, userID) - if len(ret) == 0 { - panic("no return value specified for UpdateLastViewedAt") - } - var r0 map[string]int64 var r1 error if rf, ok := ret.Get(0).(func([]string, string) (map[string]int64, error)); ok { @@ -2828,10 +2432,6 @@ func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userID string) ( func (_m *ChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int, mentionCountRoot int, urgentMentionCount int, setUnreadCountRoot bool) (*model.ChannelUnreadAt, error) { ret := _m.Called(unreadPost, userID, mentionCount, mentionCountRoot, urgentMentionCount, setUnreadCountRoot) - if len(ret) == 0 { - panic("no return value specified for UpdateLastViewedAtPost") - } - var r0 *model.ChannelUnreadAt var r1 error if rf, ok := ret.Get(0).(func(*model.Post, string, int, int, int, bool) (*model.ChannelUnreadAt, error)); ok { @@ -2858,10 +2458,6 @@ func (_m *ChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID st func (_m *ChannelStore) UpdateMember(ctx request.CTX, member *model.ChannelMember) (*model.ChannelMember, error) { ret := _m.Called(ctx, member) - if len(ret) == 0 { - panic("no return value specified for UpdateMember") - } - var r0 *model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.ChannelMember) (*model.ChannelMember, error)); ok { @@ -2888,10 +2484,6 @@ func (_m *ChannelStore) UpdateMember(ctx request.CTX, member *model.ChannelMembe func (_m *ChannelStore) UpdateMemberNotifyProps(channelID string, userID string, props map[string]string) (*model.ChannelMember, error) { ret := _m.Called(channelID, userID, props) - if len(ret) == 0 { - panic("no return value specified for UpdateMemberNotifyProps") - } - var r0 *model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(string, string, map[string]string) (*model.ChannelMember, error)); ok { @@ -2918,10 +2510,6 @@ func (_m *ChannelStore) UpdateMemberNotifyProps(channelID string, userID string, func (_m *ChannelStore) UpdateMembersRole(channelID string, userIDs []string) error { ret := _m.Called(channelID, userIDs) - if len(ret) == 0 { - panic("no return value specified for UpdateMembersRole") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(channelID, userIDs) @@ -2936,10 +2524,6 @@ func (_m *ChannelStore) UpdateMembersRole(channelID string, userIDs []string) er func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) { ret := _m.Called(members) - if len(ret) == 0 { - panic("no return value specified for UpdateMultipleMembers") - } - var r0 []*model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func([]*model.ChannelMember) ([]*model.ChannelMember, error)); ok { @@ -2966,10 +2550,6 @@ func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([ func (_m *ChannelStore) UpdateSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) { ret := _m.Called(userID, teamID, categories) - if len(ret) == 0 { - panic("no return value specified for UpdateSidebarCategories") - } - var r0 []*model.SidebarCategoryWithChannels var r1 []*model.SidebarCategoryWithChannels var r2 error @@ -3005,10 +2585,6 @@ func (_m *ChannelStore) UpdateSidebarCategories(userID string, teamID string, ca func (_m *ChannelStore) UpdateSidebarCategoryOrder(userID string, teamID string, categoryOrder []string) error { ret := _m.Called(userID, teamID, categoryOrder) - if len(ret) == 0 { - panic("no return value specified for UpdateSidebarCategoryOrder") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, []string) error); ok { r0 = rf(userID, teamID, categoryOrder) @@ -3023,10 +2599,6 @@ func (_m *ChannelStore) UpdateSidebarCategoryOrder(userID string, teamID string, func (_m *ChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamID string) error { ret := _m.Called(channel, newTeamID) - if len(ret) == 0 { - panic("no return value specified for UpdateSidebarChannelCategoryOnMove") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Channel, string) error); ok { r0 = rf(channel, newTeamID) @@ -3041,10 +2613,6 @@ func (_m *ChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channe func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences model.Preferences) error { ret := _m.Called(preferences) - if len(ret) == 0 { - panic("no return value specified for UpdateSidebarChannelsByPreferences") - } - var r0 error if rf, ok := ret.Get(0).(func(model.Preferences) error); ok { r0 = rf(preferences) @@ -3059,10 +2627,6 @@ func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences model.Pre func (_m *ChannelStore) UserBelongsToChannels(userID string, channelIds []string) (bool, error) { ret := _m.Called(userID, channelIds) - if len(ret) == 0 { - panic("no return value specified for UserBelongsToChannels") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, []string) (bool, error)); ok { @@ -3083,12 +2647,13 @@ func (_m *ChannelStore) UserBelongsToChannels(userID string, channelIds []string return r0, r1 } -// NewChannelStore creates a new instance of ChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewChannelStore(t interface { +type mockConstructorTestingTNewChannelStore interface { mock.TestingT Cleanup(func()) -}) *ChannelStore { +} + +// NewChannelStore creates a new instance of ChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChannelStore(t mockConstructorTestingTNewChannelStore) *ChannelStore { mock := &ChannelStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ClusterDiscoveryStore.go b/server/channels/store/storetest/mocks/ClusterDiscoveryStore.go index 0c20c7efa0..3f6a41de03 100644 --- a/server/channels/store/storetest/mocks/ClusterDiscoveryStore.go +++ b/server/channels/store/storetest/mocks/ClusterDiscoveryStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type ClusterDiscoveryStore struct { func (_m *ClusterDiscoveryStore) Cleanup() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Cleanup") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -36,10 +32,6 @@ func (_m *ClusterDiscoveryStore) Cleanup() error { func (_m *ClusterDiscoveryStore) Delete(discovery *model.ClusterDiscovery) (bool, error) { ret := _m.Called(discovery) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) (bool, error)); ok { @@ -64,10 +56,6 @@ func (_m *ClusterDiscoveryStore) Delete(discovery *model.ClusterDiscovery) (bool func (_m *ClusterDiscoveryStore) Exists(discovery *model.ClusterDiscovery) (bool, error) { ret := _m.Called(discovery) - if len(ret) == 0 { - panic("no return value specified for Exists") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) (bool, error)); ok { @@ -92,10 +80,6 @@ func (_m *ClusterDiscoveryStore) Exists(discovery *model.ClusterDiscovery) (bool func (_m *ClusterDiscoveryStore) GetAll(discoveryType string, clusterName string) ([]*model.ClusterDiscovery, error) { ret := _m.Called(discoveryType, clusterName) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.ClusterDiscovery var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.ClusterDiscovery, error)); ok { @@ -122,10 +106,6 @@ func (_m *ClusterDiscoveryStore) GetAll(discoveryType string, clusterName string func (_m *ClusterDiscoveryStore) Save(discovery *model.ClusterDiscovery) error { ret := _m.Called(discovery) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) error); ok { r0 = rf(discovery) @@ -140,10 +120,6 @@ func (_m *ClusterDiscoveryStore) Save(discovery *model.ClusterDiscovery) error { func (_m *ClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery) error { ret := _m.Called(discovery) - if len(ret) == 0 { - panic("no return value specified for SetLastPingAt") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) error); ok { r0 = rf(discovery) @@ -154,12 +130,13 @@ func (_m *ClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery return r0 } -// NewClusterDiscoveryStore creates a new instance of ClusterDiscoveryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClusterDiscoveryStore(t interface { +type mockConstructorTestingTNewClusterDiscoveryStore interface { mock.TestingT Cleanup(func()) -}) *ClusterDiscoveryStore { +} + +// NewClusterDiscoveryStore creates a new instance of ClusterDiscoveryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewClusterDiscoveryStore(t mockConstructorTestingTNewClusterDiscoveryStore) *ClusterDiscoveryStore { mock := &ClusterDiscoveryStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/CommandStore.go b/server/channels/store/storetest/mocks/CommandStore.go index 75bdcd6a8a..09f4f52f76 100644 --- a/server/channels/store/storetest/mocks/CommandStore.go +++ b/server/channels/store/storetest/mocks/CommandStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type CommandStore struct { func (_m *CommandStore) AnalyticsCommandCount(teamID string) (int64, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for AnalyticsCommandCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -46,10 +42,6 @@ func (_m *CommandStore) AnalyticsCommandCount(teamID string) (int64, error) { func (_m *CommandStore) Delete(commandID string, timestamp int64) error { ret := _m.Called(commandID, timestamp) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(commandID, timestamp) @@ -64,10 +56,6 @@ func (_m *CommandStore) Delete(commandID string, timestamp int64) error { func (_m *CommandStore) Get(id string) (*model.Command, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Command, error)); ok { @@ -94,10 +82,6 @@ func (_m *CommandStore) Get(id string) (*model.Command, error) { func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetByTeam") - } - var r0 []*model.Command var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { @@ -124,10 +108,6 @@ func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) { func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Command, error) { ret := _m.Called(teamID, trigger) - if len(ret) == 0 { - panic("no return value specified for GetByTrigger") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Command, error)); ok { @@ -154,10 +134,6 @@ func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Comm func (_m *CommandStore) PermanentDeleteByTeam(teamID string) error { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByTeam") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(teamID) @@ -172,10 +148,6 @@ func (_m *CommandStore) PermanentDeleteByTeam(teamID string) error { func (_m *CommandStore) PermanentDeleteByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -190,10 +162,6 @@ func (_m *CommandStore) PermanentDeleteByUser(userID string) error { func (_m *CommandStore) Save(webhook *model.Command) (*model.Command, error) { ret := _m.Called(webhook) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok { @@ -220,10 +188,6 @@ func (_m *CommandStore) Save(webhook *model.Command) (*model.Command, error) { func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) { ret := _m.Called(hook) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok { @@ -246,12 +210,13 @@ func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) { return r0, r1 } -// NewCommandStore creates a new instance of CommandStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewCommandStore(t interface { +type mockConstructorTestingTNewCommandStore interface { mock.TestingT Cleanup(func()) -}) *CommandStore { +} + +// NewCommandStore creates a new instance of CommandStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCommandStore(t mockConstructorTestingTNewCommandStore) *CommandStore { mock := &CommandStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/CommandWebhookStore.go b/server/channels/store/storetest/mocks/CommandWebhookStore.go index a24d2589d7..09845d74e9 100644 --- a/server/channels/store/storetest/mocks/CommandWebhookStore.go +++ b/server/channels/store/storetest/mocks/CommandWebhookStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -23,10 +23,6 @@ func (_m *CommandWebhookStore) Cleanup() { func (_m *CommandWebhookStore) Get(id string) (*model.CommandWebhook, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.CommandWebhook var r1 error if rf, ok := ret.Get(0).(func(string) (*model.CommandWebhook, error)); ok { @@ -53,10 +49,6 @@ func (_m *CommandWebhookStore) Get(id string) (*model.CommandWebhook, error) { func (_m *CommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.CommandWebhook, error) { ret := _m.Called(webhook) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.CommandWebhook var r1 error if rf, ok := ret.Get(0).(func(*model.CommandWebhook) (*model.CommandWebhook, error)); ok { @@ -83,10 +75,6 @@ func (_m *CommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.Comma func (_m *CommandWebhookStore) TryUse(id string, limit int) error { ret := _m.Called(id, limit) - if len(ret) == 0 { - panic("no return value specified for TryUse") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(id, limit) @@ -97,12 +85,13 @@ func (_m *CommandWebhookStore) TryUse(id string, limit int) error { return r0 } -// NewCommandWebhookStore creates a new instance of CommandWebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewCommandWebhookStore(t interface { +type mockConstructorTestingTNewCommandWebhookStore interface { mock.TestingT Cleanup(func()) -}) *CommandWebhookStore { +} + +// NewCommandWebhookStore creates a new instance of CommandWebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCommandWebhookStore(t mockConstructorTestingTNewCommandWebhookStore) *CommandWebhookStore { mock := &CommandWebhookStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ComplianceStore.go b/server/channels/store/storetest/mocks/ComplianceStore.go index 9976367d97..ecd1a0e070 100644 --- a/server/channels/store/storetest/mocks/ComplianceStore.go +++ b/server/channels/store/storetest/mocks/ComplianceStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type ComplianceStore struct { func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance, cursor model.ComplianceExportCursor, limit int) ([]*model.CompliancePost, model.ComplianceExportCursor, error) { ret := _m.Called(compliance, cursor, limit) - if len(ret) == 0 { - panic("no return value specified for ComplianceExport") - } - var r0 []*model.CompliancePost var r1 model.ComplianceExportCursor var r2 error @@ -56,10 +52,6 @@ func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance, cursor func (_m *ComplianceStore) Get(id string) (*model.Compliance, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Compliance var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Compliance, error)); ok { @@ -86,10 +78,6 @@ func (_m *ComplianceStore) Get(id string) (*model.Compliance, error) { func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 model.Compliances var r1 error if rf, ok := ret.Get(0).(func(int, int) (model.Compliances, error)); ok { @@ -116,10 +104,6 @@ func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, err func (_m *ComplianceStore) MessageExport(c request.CTX, cursor model.MessageExportCursor, limit int) ([]*model.MessageExport, model.MessageExportCursor, error) { ret := _m.Called(c, cursor, limit) - if len(ret) == 0 { - panic("no return value specified for MessageExport") - } - var r0 []*model.MessageExport var r1 model.MessageExportCursor var r2 error @@ -153,10 +137,6 @@ func (_m *ComplianceStore) MessageExport(c request.CTX, cursor model.MessageExpo func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, error) { ret := _m.Called(compliance) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Compliance var r1 error if rf, ok := ret.Get(0).(func(*model.Compliance) (*model.Compliance, error)); ok { @@ -183,10 +163,6 @@ func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, error) { ret := _m.Called(compliance) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Compliance var r1 error if rf, ok := ret.Get(0).(func(*model.Compliance) (*model.Compliance, error)); ok { @@ -209,12 +185,13 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian return r0, r1 } -// NewComplianceStore creates a new instance of ComplianceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewComplianceStore(t interface { +type mockConstructorTestingTNewComplianceStore interface { mock.TestingT Cleanup(func()) -}) *ComplianceStore { +} + +// NewComplianceStore creates a new instance of ComplianceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewComplianceStore(t mockConstructorTestingTNewComplianceStore) *ComplianceStore { mock := &ComplianceStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/DesktopTokensStore.go b/server/channels/store/storetest/mocks/DesktopTokensStore.go index 84d3a9ee65..53412238be 100644 --- a/server/channels/store/storetest/mocks/DesktopTokensStore.go +++ b/server/channels/store/storetest/mocks/DesktopTokensStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -15,10 +15,6 @@ type DesktopTokensStore struct { func (_m *DesktopTokensStore) Delete(token string) error { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(token) @@ -33,10 +29,6 @@ func (_m *DesktopTokensStore) Delete(token string) error { func (_m *DesktopTokensStore) DeleteByUserId(userId string) error { ret := _m.Called(userId) - if len(ret) == 0 { - panic("no return value specified for DeleteByUserId") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userId) @@ -51,10 +43,6 @@ func (_m *DesktopTokensStore) DeleteByUserId(userId string) error { func (_m *DesktopTokensStore) DeleteOlderThan(minCreatedAt int64) error { ret := _m.Called(minCreatedAt) - if len(ret) == 0 { - panic("no return value specified for DeleteOlderThan") - } - var r0 error if rf, ok := ret.Get(0).(func(int64) error); ok { r0 = rf(minCreatedAt) @@ -69,10 +57,6 @@ func (_m *DesktopTokensStore) DeleteOlderThan(minCreatedAt int64) error { func (_m *DesktopTokensStore) GetUserId(token string, minCreatedAt int64) (*string, error) { ret := _m.Called(token, minCreatedAt) - if len(ret) == 0 { - panic("no return value specified for GetUserId") - } - var r0 *string var r1 error if rf, ok := ret.Get(0).(func(string, int64) (*string, error)); ok { @@ -99,10 +83,6 @@ func (_m *DesktopTokensStore) GetUserId(token string, minCreatedAt int64) (*stri func (_m *DesktopTokensStore) Insert(token string, createAt int64, userId string) error { ret := _m.Called(token, createAt, userId) - if len(ret) == 0 { - panic("no return value specified for Insert") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64, string) error); ok { r0 = rf(token, createAt, userId) @@ -113,12 +93,13 @@ func (_m *DesktopTokensStore) Insert(token string, createAt int64, userId string return r0 } -// NewDesktopTokensStore creates a new instance of DesktopTokensStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDesktopTokensStore(t interface { +type mockConstructorTestingTNewDesktopTokensStore interface { mock.TestingT Cleanup(func()) -}) *DesktopTokensStore { +} + +// NewDesktopTokensStore creates a new instance of DesktopTokensStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDesktopTokensStore(t mockConstructorTestingTNewDesktopTokensStore) *DesktopTokensStore { mock := &DesktopTokensStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/DraftStore.go b/server/channels/store/storetest/mocks/DraftStore.go index c7309bcbbf..e6890f8829 100644 --- a/server/channels/store/storetest/mocks/DraftStore.go +++ b/server/channels/store/storetest/mocks/DraftStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type DraftStore struct { func (_m *DraftStore) Delete(userID string, channelID string, rootID string) error { ret := _m.Called(userID, channelID, rootID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(userID, channelID, rootID) @@ -36,10 +32,6 @@ func (_m *DraftStore) Delete(userID string, channelID string, rootID string) err func (_m *DraftStore) DeleteDraftsAssociatedWithPost(channelID string, rootID string) error { ret := _m.Called(channelID, rootID) - if len(ret) == 0 { - panic("no return value specified for DeleteDraftsAssociatedWithPost") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(channelID, rootID) @@ -54,10 +46,6 @@ func (_m *DraftStore) DeleteDraftsAssociatedWithPost(channelID string, rootID st func (_m *DraftStore) DeleteEmptyDraftsByCreateAtAndUserId(createAt int64, userId string) error { ret := _m.Called(createAt, userId) - if len(ret) == 0 { - panic("no return value specified for DeleteEmptyDraftsByCreateAtAndUserId") - } - var r0 error if rf, ok := ret.Get(0).(func(int64, string) error); ok { r0 = rf(createAt, userId) @@ -72,10 +60,6 @@ func (_m *DraftStore) DeleteEmptyDraftsByCreateAtAndUserId(createAt int64, userI func (_m *DraftStore) DeleteOrphanDraftsByCreateAtAndUserId(createAt int64, userId string) error { ret := _m.Called(createAt, userId) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanDraftsByCreateAtAndUserId") - } - var r0 error if rf, ok := ret.Get(0).(func(int64, string) error); ok { r0 = rf(createAt, userId) @@ -90,10 +74,6 @@ func (_m *DraftStore) DeleteOrphanDraftsByCreateAtAndUserId(createAt int64, user func (_m *DraftStore) Get(userID string, channelID string, rootID string, includeDeleted bool) (*model.Draft, error) { ret := _m.Called(userID, channelID, rootID, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Draft var r1 error if rf, ok := ret.Get(0).(func(string, string, string, bool) (*model.Draft, error)); ok { @@ -120,10 +100,6 @@ func (_m *DraftStore) Get(userID string, channelID string, rootID string, includ func (_m *DraftStore) GetDraftsForUser(userID string, teamID string) ([]*model.Draft, error) { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for GetDraftsForUser") - } - var r0 []*model.Draft var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.Draft, error)); ok { @@ -150,10 +126,6 @@ func (_m *DraftStore) GetDraftsForUser(userID string, teamID string) ([]*model.D func (_m *DraftStore) GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration(createAt int64, userId string) (int64, string, error) { ret := _m.Called(createAt, userId) - if len(ret) == 0 { - panic("no return value specified for GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration") - } - var r0 int64 var r1 string var r2 error @@ -185,10 +157,6 @@ func (_m *DraftStore) GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration(crea func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) { ret := _m.Called(d) - if len(ret) == 0 { - panic("no return value specified for Upsert") - } - var r0 *model.Draft var r1 error if rf, ok := ret.Get(0).(func(*model.Draft) (*model.Draft, error)); ok { @@ -211,12 +179,13 @@ func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) { return r0, r1 } -// NewDraftStore creates a new instance of DraftStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDraftStore(t interface { +type mockConstructorTestingTNewDraftStore interface { mock.TestingT Cleanup(func()) -}) *DraftStore { +} + +// NewDraftStore creates a new instance of DraftStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDraftStore(t mockConstructorTestingTNewDraftStore) *DraftStore { mock := &DraftStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/EmojiStore.go b/server/channels/store/storetest/mocks/EmojiStore.go index 9a89cd4697..1e830a15a4 100644 --- a/server/channels/store/storetest/mocks/EmojiStore.go +++ b/server/channels/store/storetest/mocks/EmojiStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type EmojiStore struct { func (_m *EmojiStore) Delete(emoji *model.Emoji, timestamp int64) error { ret := _m.Called(emoji, timestamp) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Emoji, int64) error); ok { r0 = rf(emoji, timestamp) @@ -37,10 +33,6 @@ func (_m *EmojiStore) Delete(emoji *model.Emoji, timestamp int64) error { func (_m *EmojiStore) Get(c request.CTX, id string, allowFromCache bool) (*model.Emoji, error) { ret := _m.Called(c, id, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Emoji var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, bool) (*model.Emoji, error)); ok { @@ -67,10 +59,6 @@ func (_m *EmojiStore) Get(c request.CTX, id string, allowFromCache bool) (*model func (_m *EmojiStore) GetByName(c request.CTX, name string, allowFromCache bool) (*model.Emoji, error) { ret := _m.Called(c, name, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Emoji var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, bool) (*model.Emoji, error)); ok { @@ -97,10 +85,6 @@ func (_m *EmojiStore) GetByName(c request.CTX, name string, allowFromCache bool) func (_m *EmojiStore) GetList(offset int, limit int, sort string) ([]*model.Emoji, error) { ret := _m.Called(offset, limit, sort) - if len(ret) == 0 { - panic("no return value specified for GetList") - } - var r0 []*model.Emoji var r1 error if rf, ok := ret.Get(0).(func(int, int, string) ([]*model.Emoji, error)); ok { @@ -127,10 +111,6 @@ func (_m *EmojiStore) GetList(offset int, limit int, sort string) ([]*model.Emoj func (_m *EmojiStore) GetMultipleByName(c request.CTX, names []string) ([]*model.Emoji, error) { ret := _m.Called(c, names) - if len(ret) == 0 { - panic("no return value specified for GetMultipleByName") - } - var r0 []*model.Emoji var r1 error if rf, ok := ret.Get(0).(func(request.CTX, []string) ([]*model.Emoji, error)); ok { @@ -157,10 +137,6 @@ func (_m *EmojiStore) GetMultipleByName(c request.CTX, names []string) ([]*model func (_m *EmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) { ret := _m.Called(emoji) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Emoji var r1 error if rf, ok := ret.Get(0).(func(*model.Emoji) (*model.Emoji, error)); ok { @@ -187,10 +163,6 @@ func (_m *EmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) { func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.Emoji, error) { ret := _m.Called(name, prefixOnly, limit) - if len(ret) == 0 { - panic("no return value specified for Search") - } - var r0 []*model.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, bool, int) ([]*model.Emoji, error)); ok { @@ -213,12 +185,13 @@ func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model. return r0, r1 } -// NewEmojiStore creates a new instance of EmojiStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEmojiStore(t interface { +type mockConstructorTestingTNewEmojiStore interface { mock.TestingT Cleanup(func()) -}) *EmojiStore { +} + +// NewEmojiStore creates a new instance of EmojiStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEmojiStore(t mockConstructorTestingTNewEmojiStore) *EmojiStore { mock := &EmojiStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/FileInfoStore.go b/server/channels/store/storetest/mocks/FileInfoStore.go index 71231ea3ce..3c00bd6285 100644 --- a/server/channels/store/storetest/mocks/FileInfoStore.go +++ b/server/channels/store/storetest/mocks/FileInfoStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type FileInfoStore struct { func (_m *FileInfoStore) AttachToPost(c request.CTX, fileID string, postID string, channelID string, creatorID string) error { ret := _m.Called(c, fileID, postID, channelID, creatorID) - if len(ret) == 0 { - panic("no return value specified for AttachToPost") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, string) error); ok { r0 = rf(c, fileID, postID, channelID, creatorID) @@ -42,10 +38,6 @@ func (_m *FileInfoStore) ClearCaches() { func (_m *FileInfoStore) CountAll() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for CountAll") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -70,10 +62,6 @@ func (_m *FileInfoStore) CountAll() (int64, error) { func (_m *FileInfoStore) DeleteForPost(c request.CTX, postID string) (string, error) { ret := _m.Called(c, postID) - if len(ret) == 0 { - panic("no return value specified for DeleteForPost") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (string, error)); ok { @@ -98,10 +86,6 @@ func (_m *FileInfoStore) DeleteForPost(c request.CTX, postID string) (string, er func (_m *FileInfoStore) Get(id string) (*model.FileInfo, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok { @@ -128,10 +112,6 @@ func (_m *FileInfoStore) Get(id string) (*model.FileInfo, error) { func (_m *FileInfoStore) GetByIds(ids []string) ([]*model.FileInfo, error) { ret := _m.Called(ids) - if len(ret) == 0 { - panic("no return value specified for GetByIds") - } - var r0 []*model.FileInfo var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.FileInfo, error)); ok { @@ -158,10 +138,6 @@ func (_m *FileInfoStore) GetByIds(ids []string) ([]*model.FileInfo, error) { func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for GetByPath") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok { @@ -188,10 +164,6 @@ func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) { func (_m *FileInfoStore) GetFilesBatchForIndexing(startTime int64, startFileID string, includeDeleted bool, limit int) ([]*model.FileForIndexing, error) { ret := _m.Called(startTime, startFileID, includeDeleted, limit) - if len(ret) == 0 { - panic("no return value specified for GetFilesBatchForIndexing") - } - var r0 []*model.FileForIndexing var r1 error if rf, ok := ret.Get(0).(func(int64, string, bool, int) ([]*model.FileForIndexing, error)); ok { @@ -218,10 +190,6 @@ func (_m *FileInfoStore) GetFilesBatchForIndexing(startTime int64, startFileID s func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) { ret := _m.Called(postID, readFromMaster, includeDeleted, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetForPost") - } - var r0 []*model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string, bool, bool, bool) ([]*model.FileInfo, error)); ok { @@ -248,10 +216,6 @@ func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeD func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetForUser") - } - var r0 []*model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.FileInfo, error)); ok { @@ -278,10 +242,6 @@ func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) { func (_m *FileInfoStore) GetFromMaster(id string) (*model.FileInfo, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetFromMaster") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok { @@ -308,10 +268,6 @@ func (_m *FileInfoStore) GetFromMaster(id string) (*model.FileInfo, error) { func (_m *FileInfoStore) GetStorageUsage(allowFromCache bool, includeDeleted bool) (int64, error) { ret := _m.Called(allowFromCache, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetStorageUsage") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(bool, bool) (int64, error)); ok { @@ -336,10 +292,6 @@ func (_m *FileInfoStore) GetStorageUsage(allowFromCache bool, includeDeleted boo func (_m *FileInfoStore) GetUptoNSizeFileTime(n int64) (int64, error) { ret := _m.Called(n) - if len(ret) == 0 { - panic("no return value specified for GetUptoNSizeFileTime") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok { @@ -364,10 +316,6 @@ func (_m *FileInfoStore) GetUptoNSizeFileTime(n int64) (int64, error) { func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error) { ret := _m.Called(page, perPage, opt) - if len(ret) == 0 { - panic("no return value specified for GetWithOptions") - } - var r0 []*model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, error)); ok { @@ -399,10 +347,6 @@ func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postID string, deleted func (_m *FileInfoStore) PermanentDelete(c request.CTX, fileID string) error { ret := _m.Called(c, fileID) - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(c, fileID) @@ -417,10 +361,6 @@ func (_m *FileInfoStore) PermanentDelete(c request.CTX, fileID string) error { func (_m *FileInfoStore) PermanentDeleteBatch(ctx request.CTX, endTime int64, limit int64) (int64, error) { ret := _m.Called(ctx, endTime, limit) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatch") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(request.CTX, int64, int64) (int64, error)); ok { @@ -445,10 +385,6 @@ func (_m *FileInfoStore) PermanentDeleteBatch(ctx request.CTX, endTime int64, li func (_m *FileInfoStore) PermanentDeleteByUser(ctx request.CTX, userID string) (int64, error) { ret := _m.Called(ctx, userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (int64, error)); ok { @@ -473,10 +409,6 @@ func (_m *FileInfoStore) PermanentDeleteByUser(ctx request.CTX, userID string) ( func (_m *FileInfoStore) Save(ctx request.CTX, info *model.FileInfo) (*model.FileInfo, error) { ret := _m.Called(ctx, info) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) (*model.FileInfo, error)); ok { @@ -503,10 +435,6 @@ func (_m *FileInfoStore) Save(ctx request.CTX, info *model.FileInfo) (*model.Fil func (_m *FileInfoStore) Search(ctx request.CTX, paramsList []*model.SearchParams, userID string, teamID string, page int, perPage int) (*model.FileInfoList, error) { ret := _m.Called(ctx, paramsList, userID, teamID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for Search") - } - var r0 *model.FileInfoList var r1 error if rf, ok := ret.Get(0).(func(request.CTX, []*model.SearchParams, string, string, int, int) (*model.FileInfoList, error)); ok { @@ -533,10 +461,6 @@ func (_m *FileInfoStore) Search(ctx request.CTX, paramsList []*model.SearchParam func (_m *FileInfoStore) SetContent(ctx request.CTX, fileID string, content string) error { ret := _m.Called(ctx, fileID, content) - if len(ret) == 0 { - panic("no return value specified for SetContent") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, string) error); ok { r0 = rf(ctx, fileID, content) @@ -551,10 +475,6 @@ func (_m *FileInfoStore) SetContent(ctx request.CTX, fileID string, content stri func (_m *FileInfoStore) Upsert(rctx request.CTX, info *model.FileInfo) (*model.FileInfo, error) { ret := _m.Called(rctx, info) - if len(ret) == 0 { - panic("no return value specified for Upsert") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) (*model.FileInfo, error)); ok { @@ -577,12 +497,13 @@ func (_m *FileInfoStore) Upsert(rctx request.CTX, info *model.FileInfo) (*model. return r0, r1 } -// NewFileInfoStore creates a new instance of FileInfoStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewFileInfoStore(t interface { +type mockConstructorTestingTNewFileInfoStore interface { mock.TestingT Cleanup(func()) -}) *FileInfoStore { +} + +// NewFileInfoStore creates a new instance of FileInfoStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewFileInfoStore(t mockConstructorTestingTNewFileInfoStore) *FileInfoStore { mock := &FileInfoStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/GroupStore.go b/server/channels/store/storetest/mocks/GroupStore.go index d3b90728b4..40b45cb805 100644 --- a/server/channels/store/storetest/mocks/GroupStore.go +++ b/server/channels/store/storetest/mocks/GroupStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type GroupStore struct { func (_m *GroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, error) { ret := _m.Called(userID, syncableID, syncableType) - if len(ret) == 0 { - panic("no return value specified for AdminRoleGroupsForSyncableMember") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) ([]string, error)); ok { @@ -48,10 +44,6 @@ func (_m *GroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID func (_m *GroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) { ret := _m.Called(channelID, groupIDs, page, perPage) - if len(ret) == 0 { - panic("no return value specified for ChannelMembersMinusGroupMembers") - } - var r0 []*model.UserWithGroups var r1 error if rf, ok := ret.Get(0).(func(string, []string, int, int) ([]*model.UserWithGroups, error)); ok { @@ -78,10 +70,6 @@ func (_m *GroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs func (_m *GroupStore) ChannelMembersToAdd(since int64, channelID *string, includeRemovedMembers bool) ([]*model.UserChannelIDPair, error) { ret := _m.Called(since, channelID, includeRemovedMembers) - if len(ret) == 0 { - panic("no return value specified for ChannelMembersToAdd") - } - var r0 []*model.UserChannelIDPair var r1 error if rf, ok := ret.Get(0).(func(int64, *string, bool) ([]*model.UserChannelIDPair, error)); ok { @@ -108,10 +96,6 @@ func (_m *GroupStore) ChannelMembersToAdd(since int64, channelID *string, includ func (_m *GroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for ChannelMembersToRemove") - } - var r0 []*model.ChannelMember var r1 error if rf, ok := ret.Get(0).(func(*string) ([]*model.ChannelMember, error)); ok { @@ -138,10 +122,6 @@ func (_m *GroupStore) ChannelMembersToRemove(channelID *string) ([]*model.Channe func (_m *GroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, error) { ret := _m.Called(channelID, groupIDs) - if len(ret) == 0 { - panic("no return value specified for CountChannelMembersMinusGroupMembers") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, []string) (int64, error)); ok { @@ -166,10 +146,6 @@ func (_m *GroupStore) CountChannelMembersMinusGroupMembers(channelID string, gro func (_m *GroupStore) CountGroupsByChannel(channelID string, opts model.GroupSearchOpts) (int64, error) { ret := _m.Called(channelID, opts) - if len(ret) == 0 { - panic("no return value specified for CountGroupsByChannel") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (int64, error)); ok { @@ -194,10 +170,6 @@ func (_m *GroupStore) CountGroupsByChannel(channelID string, opts model.GroupSea func (_m *GroupStore) CountGroupsByTeam(teamID string, opts model.GroupSearchOpts) (int64, error) { ret := _m.Called(teamID, opts) - if len(ret) == 0 { - panic("no return value specified for CountGroupsByTeam") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (int64, error)); ok { @@ -222,10 +194,6 @@ func (_m *GroupStore) CountGroupsByTeam(teamID string, opts model.GroupSearchOpt func (_m *GroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, error) { ret := _m.Called(teamID, groupIDs) - if len(ret) == 0 { - panic("no return value specified for CountTeamMembersMinusGroupMembers") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, []string) (int64, error)); ok { @@ -250,10 +218,6 @@ func (_m *GroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs func (_m *GroupStore) Create(group *model.Group) (*model.Group, error) { ret := _m.Called(group) - if len(ret) == 0 { - panic("no return value specified for Create") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(*model.Group) (*model.Group, error)); ok { @@ -280,10 +244,6 @@ func (_m *GroupStore) Create(group *model.Group) (*model.Group, error) { func (_m *GroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) { ret := _m.Called(groupSyncable) - if len(ret) == 0 { - panic("no return value specified for CreateGroupSyncable") - } - var r0 *model.GroupSyncable var r1 error if rf, ok := ret.Get(0).(func(*model.GroupSyncable) (*model.GroupSyncable, error)); ok { @@ -310,10 +270,6 @@ func (_m *GroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (* func (_m *GroupStore) CreateWithUserIds(group *model.GroupWithUserIds) (*model.Group, error) { ret := _m.Called(group) - if len(ret) == 0 { - panic("no return value specified for CreateWithUserIds") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(*model.GroupWithUserIds) (*model.Group, error)); ok { @@ -340,10 +296,6 @@ func (_m *GroupStore) CreateWithUserIds(group *model.GroupWithUserIds) (*model.G func (_m *GroupStore) Delete(groupID string) (*model.Group, error) { ret := _m.Called(groupID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok { @@ -370,10 +322,6 @@ func (_m *GroupStore) Delete(groupID string) (*model.Group, error) { func (_m *GroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) { ret := _m.Called(groupID, syncableID, syncableType) - if len(ret) == 0 { - panic("no return value specified for DeleteGroupSyncable") - } - var r0 *model.GroupSyncable var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) (*model.GroupSyncable, error)); ok { @@ -400,10 +348,6 @@ func (_m *GroupStore) DeleteGroupSyncable(groupID string, syncableID string, syn func (_m *GroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, error) { ret := _m.Called(groupID, userID) - if len(ret) == 0 { - panic("no return value specified for DeleteMember") - } - var r0 *model.GroupMember var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok { @@ -430,10 +374,6 @@ func (_m *GroupStore) DeleteMember(groupID string, userID string) (*model.GroupM func (_m *GroupStore) DeleteMembers(groupID string, userIDs []string) ([]*model.GroupMember, error) { ret := _m.Called(groupID, userIDs) - if len(ret) == 0 { - panic("no return value specified for DeleteMembers") - } - var r0 []*model.GroupMember var r1 error if rf, ok := ret.Get(0).(func(string, []string) ([]*model.GroupMember, error)); ok { @@ -460,10 +400,6 @@ func (_m *GroupStore) DeleteMembers(groupID string, userIDs []string) ([]*model. func (_m *GroupStore) DistinctGroupMemberCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for DistinctGroupMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -488,10 +424,6 @@ func (_m *GroupStore) DistinctGroupMemberCount() (int64, error) { func (_m *GroupStore) DistinctGroupMemberCountForSource(source model.GroupSource) (int64, error) { ret := _m.Called(source) - if len(ret) == 0 { - panic("no return value specified for DistinctGroupMemberCountForSource") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(model.GroupSource) (int64, error)); ok { @@ -516,10 +448,6 @@ func (_m *GroupStore) DistinctGroupMemberCountForSource(source model.GroupSource func (_m *GroupStore) Get(groupID string) (*model.Group, error) { ret := _m.Called(groupID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok { @@ -546,10 +474,6 @@ func (_m *GroupStore) Get(groupID string) (*model.Group, error) { func (_m *GroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error) { ret := _m.Called(groupSource) - if len(ret) == 0 { - panic("no return value specified for GetAllBySource") - } - var r0 []*model.Group var r1 error if rf, ok := ret.Get(0).(func(model.GroupSource) ([]*model.Group, error)); ok { @@ -576,10 +500,6 @@ func (_m *GroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Gr func (_m *GroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error) { ret := _m.Called(groupID, syncableType) - if len(ret) == 0 { - panic("no return value specified for GetAllGroupSyncablesByGroupId") - } - var r0 []*model.GroupSyncable var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) ([]*model.GroupSyncable, error)); ok { @@ -606,10 +526,6 @@ func (_m *GroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType func (_m *GroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) { ret := _m.Called(groupIDs) - if len(ret) == 0 { - panic("no return value specified for GetByIDs") - } - var r0 []*model.Group var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Group, error)); ok { @@ -636,10 +552,6 @@ func (_m *GroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) { func (_m *GroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, error) { ret := _m.Called(name, opts) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (*model.Group, error)); ok { @@ -666,10 +578,6 @@ func (_m *GroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model func (_m *GroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error) { ret := _m.Called(remoteID, groupSource) - if len(ret) == 0 { - panic("no return value specified for GetByRemoteID") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSource) (*model.Group, error)); ok { @@ -696,10 +604,6 @@ func (_m *GroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSour func (_m *GroupStore) GetByUser(userID string) ([]*model.Group, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetByUser") - } - var r0 []*model.Group var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Group, error)); ok { @@ -726,10 +630,6 @@ func (_m *GroupStore) GetByUser(userID string) ([]*model.Group, error) { func (_m *GroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) { ret := _m.Called(groupID, syncableID, syncableType) - if len(ret) == 0 { - panic("no return value specified for GetGroupSyncable") - } - var r0 *model.GroupSyncable var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) (*model.GroupSyncable, error)); ok { @@ -756,10 +656,6 @@ func (_m *GroupStore) GetGroupSyncable(groupID string, syncableID string, syncab func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts, viewRestrictions *model.ViewUsersRestrictions) ([]*model.Group, error) { ret := _m.Called(page, perPage, opts, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetGroups") - } - var r0 []*model.Group var r1 error if rf, ok := ret.Get(0).(func(int, int, model.GroupSearchOpts, *model.ViewUsersRestrictions) ([]*model.Group, error)); ok { @@ -786,10 +682,6 @@ func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpt func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) { ret := _m.Called(teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetGroupsAssociatedToChannelsByTeam") - } - var r0 map[string][]*model.GroupWithSchemeAdmin var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)); ok { @@ -816,10 +708,6 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts mo func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) { ret := _m.Called(channelID, opts) - if len(ret) == 0 { - panic("no return value specified for GetGroupsByChannel") - } - var r0 []*model.GroupWithSchemeAdmin var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)); ok { @@ -846,10 +734,6 @@ func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearc func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) { ret := _m.Called(teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetGroupsByTeam") - } - var r0 []*model.GroupWithSchemeAdmin var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)); ok { @@ -876,10 +760,6 @@ func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) func (_m *GroupStore) GetMember(groupID string, userID string) (*model.GroupMember, error) { ret := _m.Called(groupID, userID) - if len(ret) == 0 { - panic("no return value specified for GetMember") - } - var r0 *model.GroupMember var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok { @@ -906,10 +786,6 @@ func (_m *GroupStore) GetMember(groupID string, userID string) (*model.GroupMemb func (_m *GroupStore) GetMemberCount(groupID string) (int64, error) { ret := _m.Called(groupID) - if len(ret) == 0 { - panic("no return value specified for GetMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -934,10 +810,6 @@ func (_m *GroupStore) GetMemberCount(groupID string) (int64, error) { func (_m *GroupStore) GetMemberCountWithRestrictions(groupID string, viewRestrictions *model.ViewUsersRestrictions) (int64, error) { ret := _m.Called(groupID, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetMemberCountWithRestrictions") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok { @@ -962,10 +834,6 @@ func (_m *GroupStore) GetMemberCountWithRestrictions(groupID string, viewRestric func (_m *GroupStore) GetMemberUsers(groupID string) ([]*model.User, error) { ret := _m.Called(groupID) - if len(ret) == 0 { - panic("no return value specified for GetMemberUsers") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.User, error)); ok { @@ -992,10 +860,6 @@ func (_m *GroupStore) GetMemberUsers(groupID string) ([]*model.User, error) { func (_m *GroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, error) { ret := _m.Called(groupID, teamID) - if len(ret) == 0 { - panic("no return value specified for GetMemberUsersInTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.User, error)); ok { @@ -1022,10 +886,6 @@ func (_m *GroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*mo func (_m *GroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, error) { ret := _m.Called(groupID, channelID) - if len(ret) == 0 { - panic("no return value specified for GetMemberUsersNotInChannel") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.User, error)); ok { @@ -1052,10 +912,6 @@ func (_m *GroupStore) GetMemberUsersNotInChannel(groupID string, channelID strin func (_m *GroupStore) GetMemberUsersPage(groupID string, page int, perPage int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(groupID, page, perPage, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetMemberUsersPage") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1082,10 +938,6 @@ func (_m *GroupStore) GetMemberUsersPage(groupID string, page int, perPage int, func (_m *GroupStore) GetMemberUsersSortedPage(groupID string, page int, perPage int, viewRestrictions *model.ViewUsersRestrictions, teammateNameDisplay string) ([]*model.User, error) { ret := _m.Called(groupID, page, perPage, viewRestrictions, teammateNameDisplay) - if len(ret) == 0 { - panic("no return value specified for GetMemberUsersSortedPage") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions, string) ([]*model.User, error)); ok { @@ -1112,10 +964,6 @@ func (_m *GroupStore) GetMemberUsersSortedPage(groupID string, page int, perPage func (_m *GroupStore) GetNonMemberUsersPage(groupID string, page int, perPage int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(groupID, page, perPage, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetNonMemberUsersPage") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1142,10 +990,6 @@ func (_m *GroupStore) GetNonMemberUsersPage(groupID string, page int, perPage in func (_m *GroupStore) GroupChannelCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupChannelCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1170,10 +1014,6 @@ func (_m *GroupStore) GroupChannelCount() (int64, error) { func (_m *GroupStore) GroupCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1198,10 +1038,6 @@ func (_m *GroupStore) GroupCount() (int64, error) { func (_m *GroupStore) GroupCountBySource(source model.GroupSource) (int64, error) { ret := _m.Called(source) - if len(ret) == 0 { - panic("no return value specified for GroupCountBySource") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(model.GroupSource) (int64, error)); ok { @@ -1226,10 +1062,6 @@ func (_m *GroupStore) GroupCountBySource(source model.GroupSource) (int64, error func (_m *GroupStore) GroupCountWithAllowReference() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupCountWithAllowReference") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1254,10 +1086,6 @@ func (_m *GroupStore) GroupCountWithAllowReference() (int64, error) { func (_m *GroupStore) GroupMemberCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1282,10 +1110,6 @@ func (_m *GroupStore) GroupMemberCount() (int64, error) { func (_m *GroupStore) GroupTeamCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupTeamCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1310,10 +1134,6 @@ func (_m *GroupStore) GroupTeamCount() (int64, error) { func (_m *GroupStore) PermanentDeleteMembersByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteMembersByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -1328,10 +1148,6 @@ func (_m *GroupStore) PermanentDeleteMembersByUser(userID string) error { func (_m *GroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, error) { ret := _m.Called(syncableID, syncableType) - if len(ret) == 0 { - panic("no return value specified for PermittedSyncableAdmins") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) ([]string, error)); ok { @@ -1358,10 +1174,6 @@ func (_m *GroupStore) PermittedSyncableAdmins(syncableID string, syncableType mo func (_m *GroupStore) Restore(groupID string) (*model.Group, error) { ret := _m.Called(groupID) - if len(ret) == 0 { - panic("no return value specified for Restore") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok { @@ -1388,10 +1200,6 @@ func (_m *GroupStore) Restore(groupID string) (*model.Group, error) { func (_m *GroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) { ret := _m.Called(teamID, groupIDs, page, perPage) - if len(ret) == 0 { - panic("no return value specified for TeamMembersMinusGroupMembers") - } - var r0 []*model.UserWithGroups var r1 error if rf, ok := ret.Get(0).(func(string, []string, int, int) ([]*model.UserWithGroups, error)); ok { @@ -1418,10 +1226,6 @@ func (_m *GroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []str func (_m *GroupStore) TeamMembersToAdd(since int64, teamID *string, includeRemovedMembers bool) ([]*model.UserTeamIDPair, error) { ret := _m.Called(since, teamID, includeRemovedMembers) - if len(ret) == 0 { - panic("no return value specified for TeamMembersToAdd") - } - var r0 []*model.UserTeamIDPair var r1 error if rf, ok := ret.Get(0).(func(int64, *string, bool) ([]*model.UserTeamIDPair, error)); ok { @@ -1448,10 +1252,6 @@ func (_m *GroupStore) TeamMembersToAdd(since int64, teamID *string, includeRemov func (_m *GroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for TeamMembersToRemove") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(*string) ([]*model.TeamMember, error)); ok { @@ -1478,10 +1278,6 @@ func (_m *GroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, func (_m *GroupStore) Update(group *model.Group) (*model.Group, error) { ret := _m.Called(group) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Group var r1 error if rf, ok := ret.Get(0).(func(*model.Group) (*model.Group, error)); ok { @@ -1508,10 +1304,6 @@ func (_m *GroupStore) Update(group *model.Group) (*model.Group, error) { func (_m *GroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) { ret := _m.Called(groupSyncable) - if len(ret) == 0 { - panic("no return value specified for UpdateGroupSyncable") - } - var r0 *model.GroupSyncable var r1 error if rf, ok := ret.Get(0).(func(*model.GroupSyncable) (*model.GroupSyncable, error)); ok { @@ -1538,10 +1330,6 @@ func (_m *GroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (* func (_m *GroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, error) { ret := _m.Called(groupID, userID) - if len(ret) == 0 { - panic("no return value specified for UpsertMember") - } - var r0 *model.GroupMember var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok { @@ -1568,10 +1356,6 @@ func (_m *GroupStore) UpsertMember(groupID string, userID string) (*model.GroupM func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model.GroupMember, error) { ret := _m.Called(groupID, userIDs) - if len(ret) == 0 { - panic("no return value specified for UpsertMembers") - } - var r0 []*model.GroupMember var r1 error if rf, ok := ret.Get(0).(func(string, []string) ([]*model.GroupMember, error)); ok { @@ -1594,12 +1378,13 @@ func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model. return r0, r1 } -// NewGroupStore creates a new instance of GroupStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewGroupStore(t interface { +type mockConstructorTestingTNewGroupStore interface { mock.TestingT Cleanup(func()) -}) *GroupStore { +} + +// NewGroupStore creates a new instance of GroupStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewGroupStore(t mockConstructorTestingTNewGroupStore) *GroupStore { mock := &GroupStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/JobStore.go b/server/channels/store/storetest/mocks/JobStore.go index 3f05f44b4e..ec9850fafd 100644 --- a/server/channels/store/storetest/mocks/JobStore.go +++ b/server/channels/store/storetest/mocks/JobStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type JobStore struct { func (_m *JobStore) Cleanup(expiryTime int64, batchSize int) error { ret := _m.Called(expiryTime, batchSize) - if len(ret) == 0 { - panic("no return value specified for Cleanup") - } - var r0 error if rf, ok := ret.Get(0).(func(int64, int) error); ok { r0 = rf(expiryTime, batchSize) @@ -37,10 +33,6 @@ func (_m *JobStore) Cleanup(expiryTime int64, batchSize int) error { func (_m *JobStore) Delete(id string) (string, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -65,10 +57,6 @@ func (_m *JobStore) Delete(id string) (string, error) { func (_m *JobStore) Get(c request.CTX, id string) (*model.Job, error) { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.Job, error)); ok { @@ -95,10 +83,6 @@ func (_m *JobStore) Get(c request.CTX, id string) (*model.Job, error) { func (_m *JobStore) GetAllByStatus(c request.CTX, status string) ([]*model.Job, error) { ret := _m.Called(c, status) - if len(ret) == 0 { - panic("no return value specified for GetAllByStatus") - } - var r0 []*model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.Job, error)); ok { @@ -125,10 +109,6 @@ func (_m *JobStore) GetAllByStatus(c request.CTX, status string) ([]*model.Job, func (_m *JobStore) GetAllByType(c request.CTX, jobType string) ([]*model.Job, error) { ret := _m.Called(c, jobType) - if len(ret) == 0 { - panic("no return value specified for GetAllByType") - } - var r0 []*model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.Job, error)); ok { @@ -155,10 +135,6 @@ func (_m *JobStore) GetAllByType(c request.CTX, jobType string) ([]*model.Job, e func (_m *JobStore) GetAllByTypeAndStatus(c request.CTX, jobType string, status string) ([]*model.Job, error) { ret := _m.Called(c, jobType, status) - if len(ret) == 0 { - panic("no return value specified for GetAllByTypeAndStatus") - } - var r0 []*model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string) ([]*model.Job, error)); ok { @@ -185,10 +161,6 @@ func (_m *JobStore) GetAllByTypeAndStatus(c request.CTX, jobType string, status func (_m *JobStore) GetAllByTypePage(c request.CTX, jobType string, offset int, limit int) ([]*model.Job, error) { ret := _m.Called(c, jobType, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAllByTypePage") - } - var r0 []*model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, int, int) ([]*model.Job, error)); ok { @@ -215,10 +187,6 @@ func (_m *JobStore) GetAllByTypePage(c request.CTX, jobType string, offset int, func (_m *JobStore) GetAllByTypesPage(c request.CTX, jobTypes []string, offset int, limit int) ([]*model.Job, error) { ret := _m.Called(c, jobTypes, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAllByTypesPage") - } - var r0 []*model.Job var r1 error if rf, ok := ret.Get(0).(func(request.CTX, []string, int, int) ([]*model.Job, error)); ok { @@ -245,10 +213,6 @@ func (_m *JobStore) GetAllByTypesPage(c request.CTX, jobTypes []string, offset i func (_m *JobStore) GetCountByStatusAndType(status string, jobType string) (int64, error) { ret := _m.Called(status, jobType) - if len(ret) == 0 { - panic("no return value specified for GetCountByStatusAndType") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string) (int64, error)); ok { @@ -273,10 +237,6 @@ func (_m *JobStore) GetCountByStatusAndType(status string, jobType string) (int6 func (_m *JobStore) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, error) { ret := _m.Called(status, jobType) - if len(ret) == 0 { - panic("no return value specified for GetNewestJobByStatusAndType") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Job, error)); ok { @@ -303,10 +263,6 @@ func (_m *JobStore) GetNewestJobByStatusAndType(status string, jobType string) ( func (_m *JobStore) GetNewestJobByStatusesAndType(statuses []string, jobType string) (*model.Job, error) { ret := _m.Called(statuses, jobType) - if len(ret) == 0 { - panic("no return value specified for GetNewestJobByStatusesAndType") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func([]string, string) (*model.Job, error)); ok { @@ -333,10 +289,6 @@ func (_m *JobStore) GetNewestJobByStatusesAndType(statuses []string, jobType str func (_m *JobStore) Save(job *model.Job) (*model.Job, error) { ret := _m.Called(job) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func(*model.Job) (*model.Job, error)); ok { @@ -363,10 +315,6 @@ func (_m *JobStore) Save(job *model.Job) (*model.Job, error) { func (_m *JobStore) SaveOnce(job *model.Job) (*model.Job, error) { ret := _m.Called(job) - if len(ret) == 0 { - panic("no return value specified for SaveOnce") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func(*model.Job) (*model.Job, error)); ok { @@ -393,10 +341,6 @@ func (_m *JobStore) SaveOnce(job *model.Job) (*model.Job, error) { func (_m *JobStore) UpdateOptimistically(job *model.Job, currentStatus string) (bool, error) { ret := _m.Called(job, currentStatus) - if len(ret) == 0 { - panic("no return value specified for UpdateOptimistically") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*model.Job, string) (bool, error)); ok { @@ -421,10 +365,6 @@ func (_m *JobStore) UpdateOptimistically(job *model.Job, currentStatus string) ( func (_m *JobStore) UpdateStatus(id string, status string) (*model.Job, error) { ret := _m.Called(id, status) - if len(ret) == 0 { - panic("no return value specified for UpdateStatus") - } - var r0 *model.Job var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Job, error)); ok { @@ -451,10 +391,6 @@ func (_m *JobStore) UpdateStatus(id string, status string) (*model.Job, error) { func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, error) { ret := _m.Called(id, currentStatus, newStatus) - if len(ret) == 0 { - panic("no return value specified for UpdateStatusOptimistically") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok { @@ -475,12 +411,13 @@ func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string, return r0, r1 } -// NewJobStore creates a new instance of JobStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewJobStore(t interface { +type mockConstructorTestingTNewJobStore interface { mock.TestingT Cleanup(func()) -}) *JobStore { +} + +// NewJobStore creates a new instance of JobStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewJobStore(t mockConstructorTestingTNewJobStore) *JobStore { mock := &JobStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/LicenseStore.go b/server/channels/store/storetest/mocks/LicenseStore.go index 92d203f6a1..2f765dbaf4 100644 --- a/server/channels/store/storetest/mocks/LicenseStore.go +++ b/server/channels/store/storetest/mocks/LicenseStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type LicenseStore struct { func (_m *LicenseStore) Get(c request.CTX, id string) (*model.LicenseRecord, error) { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.LicenseRecord var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.LicenseRecord, error)); ok { @@ -49,10 +45,6 @@ func (_m *LicenseStore) Get(c request.CTX, id string) (*model.LicenseRecord, err func (_m *LicenseStore) GetAll() ([]*model.LicenseRecord, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.LicenseRecord var r1 error if rf, ok := ret.Get(0).(func() ([]*model.LicenseRecord, error)); ok { @@ -79,10 +71,6 @@ func (_m *LicenseStore) GetAll() ([]*model.LicenseRecord, error) { func (_m *LicenseStore) Save(license *model.LicenseRecord) error { ret := _m.Called(license) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.LicenseRecord) error); ok { r0 = rf(license) @@ -93,12 +81,13 @@ func (_m *LicenseStore) Save(license *model.LicenseRecord) error { return r0 } -// NewLicenseStore creates a new instance of LicenseStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLicenseStore(t interface { +type mockConstructorTestingTNewLicenseStore interface { mock.TestingT Cleanup(func()) -}) *LicenseStore { +} + +// NewLicenseStore creates a new instance of LicenseStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLicenseStore(t mockConstructorTestingTNewLicenseStore) *LicenseStore { mock := &LicenseStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/LinkMetadataStore.go b/server/channels/store/storetest/mocks/LinkMetadataStore.go index 0ede5086b6..a7224bc575 100644 --- a/server/channels/store/storetest/mocks/LinkMetadataStore.go +++ b/server/channels/store/storetest/mocks/LinkMetadataStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type LinkMetadataStore struct { func (_m *LinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetadata, error) { ret := _m.Called(url, timestamp) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.LinkMetadata var r1 error if rf, ok := ret.Get(0).(func(string, int64) (*model.LinkMetadata, error)); ok { @@ -48,10 +44,6 @@ func (_m *LinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetada func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.LinkMetadata, error) { ret := _m.Called(linkMetadata) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.LinkMetadata var r1 error if rf, ok := ret.Get(0).(func(*model.LinkMetadata) (*model.LinkMetadata, error)); ok { @@ -74,12 +66,13 @@ func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.Link return r0, r1 } -// NewLinkMetadataStore creates a new instance of LinkMetadataStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLinkMetadataStore(t interface { +type mockConstructorTestingTNewLinkMetadataStore interface { mock.TestingT Cleanup(func()) -}) *LinkMetadataStore { +} + +// NewLinkMetadataStore creates a new instance of LinkMetadataStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLinkMetadataStore(t mockConstructorTestingTNewLinkMetadataStore) *LinkMetadataStore { mock := &LinkMetadataStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/NotifyAdminStore.go b/server/channels/store/storetest/mocks/NotifyAdminStore.go index e6b1349112..53027f8b52 100644 --- a/server/channels/store/storetest/mocks/NotifyAdminStore.go +++ b/server/channels/store/storetest/mocks/NotifyAdminStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type NotifyAdminStore struct { func (_m *NotifyAdminStore) DeleteBefore(trial bool, now int64) error { ret := _m.Called(trial, now) - if len(ret) == 0 { - panic("no return value specified for DeleteBefore") - } - var r0 error if rf, ok := ret.Get(0).(func(bool, int64) error); ok { r0 = rf(trial, now) @@ -36,10 +32,6 @@ func (_m *NotifyAdminStore) DeleteBefore(trial bool, now int64) error { func (_m *NotifyAdminStore) Get(trial bool) ([]*model.NotifyAdminData, error) { ret := _m.Called(trial) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 []*model.NotifyAdminData var r1 error if rf, ok := ret.Get(0).(func(bool) ([]*model.NotifyAdminData, error)); ok { @@ -66,10 +58,6 @@ func (_m *NotifyAdminStore) Get(trial bool) ([]*model.NotifyAdminData, error) { func (_m *NotifyAdminStore) GetDataByUserIdAndFeature(userId string, feature model.MattermostFeature) ([]*model.NotifyAdminData, error) { ret := _m.Called(userId, feature) - if len(ret) == 0 { - panic("no return value specified for GetDataByUserIdAndFeature") - } - var r0 []*model.NotifyAdminData var r1 error if rf, ok := ret.Get(0).(func(string, model.MattermostFeature) ([]*model.NotifyAdminData, error)); ok { @@ -96,10 +84,6 @@ func (_m *NotifyAdminStore) GetDataByUserIdAndFeature(userId string, feature mod func (_m *NotifyAdminStore) Save(data *model.NotifyAdminData) (*model.NotifyAdminData, error) { ret := _m.Called(data) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.NotifyAdminData var r1 error if rf, ok := ret.Get(0).(func(*model.NotifyAdminData) (*model.NotifyAdminData, error)); ok { @@ -126,10 +110,6 @@ func (_m *NotifyAdminStore) Save(data *model.NotifyAdminData) (*model.NotifyAdmi func (_m *NotifyAdminStore) Update(userId string, requiredPlan string, requiredFeature model.MattermostFeature, now int64) error { ret := _m.Called(userId, requiredPlan, requiredFeature, now) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, model.MattermostFeature, int64) error); ok { r0 = rf(userId, requiredPlan, requiredFeature, now) @@ -140,12 +120,13 @@ func (_m *NotifyAdminStore) Update(userId string, requiredPlan string, requiredF return r0 } -// NewNotifyAdminStore creates a new instance of NotifyAdminStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNotifyAdminStore(t interface { +type mockConstructorTestingTNewNotifyAdminStore interface { mock.TestingT Cleanup(func()) -}) *NotifyAdminStore { +} + +// NewNotifyAdminStore creates a new instance of NotifyAdminStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewNotifyAdminStore(t mockConstructorTestingTNewNotifyAdminStore) *NotifyAdminStore { mock := &NotifyAdminStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/OAuthStore.go b/server/channels/store/storetest/mocks/OAuthStore.go index a73b019989..080b23236e 100644 --- a/server/channels/store/storetest/mocks/OAuthStore.go +++ b/server/channels/store/storetest/mocks/OAuthStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type OAuthStore struct { func (_m *OAuthStore) DeleteApp(id string) error { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for DeleteApp") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(id) @@ -36,10 +32,6 @@ func (_m *OAuthStore) DeleteApp(id string) error { func (_m *OAuthStore) GetAccessData(token string) (*model.AccessData, error) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for GetAccessData") - } - var r0 *model.AccessData var r1 error if rf, ok := ret.Get(0).(func(string) (*model.AccessData, error)); ok { @@ -66,10 +58,6 @@ func (_m *OAuthStore) GetAccessData(token string) (*model.AccessData, error) { func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessData, error) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for GetAccessDataByRefreshToken") - } - var r0 *model.AccessData var r1 error if rf, ok := ret.Get(0).(func(string) (*model.AccessData, error)); ok { @@ -96,10 +84,6 @@ func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessDa func (_m *OAuthStore) GetAccessDataByUserForApp(userID string, clientId string) ([]*model.AccessData, error) { ret := _m.Called(userID, clientId) - if len(ret) == 0 { - panic("no return value specified for GetAccessDataByUserForApp") - } - var r0 []*model.AccessData var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.AccessData, error)); ok { @@ -126,10 +110,6 @@ func (_m *OAuthStore) GetAccessDataByUserForApp(userID string, clientId string) func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetApp") - } - var r0 *model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(string) (*model.OAuthApp, error)); ok { @@ -156,10 +136,6 @@ func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) { func (_m *OAuthStore) GetAppByUser(userID string, offset int, limit int) ([]*model.OAuthApp, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAppByUser") - } - var r0 []*model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OAuthApp, error)); ok { @@ -186,10 +162,6 @@ func (_m *OAuthStore) GetAppByUser(userID string, offset int, limit int) ([]*mod func (_m *OAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetApps") - } - var r0 []*model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(int, int) ([]*model.OAuthApp, error)); ok { @@ -216,10 +188,6 @@ func (_m *OAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error) func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) { ret := _m.Called(code) - if len(ret) == 0 { - panic("no return value specified for GetAuthData") - } - var r0 *model.AuthData var r1 error if rf, ok := ret.Get(0).(func(string) (*model.AuthData, error)); ok { @@ -246,10 +214,6 @@ func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) { func (_m *OAuthStore) GetAuthorizedApps(userID string, offset int, limit int) ([]*model.OAuthApp, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAuthorizedApps") - } - var r0 []*model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OAuthApp, error)); ok { @@ -276,10 +240,6 @@ func (_m *OAuthStore) GetAuthorizedApps(userID string, offset int, limit int) ([ func (_m *OAuthStore) GetPreviousAccessData(userID string, clientId string) (*model.AccessData, error) { ret := _m.Called(userID, clientId) - if len(ret) == 0 { - panic("no return value specified for GetPreviousAccessData") - } - var r0 *model.AccessData var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.AccessData, error)); ok { @@ -306,10 +266,6 @@ func (_m *OAuthStore) GetPreviousAccessData(userID string, clientId string) (*mo func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteAuthDataByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -324,10 +280,6 @@ func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userID string) error { func (_m *OAuthStore) RemoveAccessData(token string) error { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for RemoveAccessData") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(token) @@ -342,10 +294,6 @@ func (_m *OAuthStore) RemoveAccessData(token string) error { func (_m *OAuthStore) RemoveAllAccessData() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for RemoveAllAccessData") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -360,10 +308,6 @@ func (_m *OAuthStore) RemoveAllAccessData() error { func (_m *OAuthStore) RemoveAuthData(code string) error { ret := _m.Called(code) - if len(ret) == 0 { - panic("no return value specified for RemoveAuthData") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(code) @@ -378,10 +322,6 @@ func (_m *OAuthStore) RemoveAuthData(code string) error { func (_m *OAuthStore) RemoveAuthDataByClientId(clientId string, userId string) error { ret := _m.Called(clientId, userId) - if len(ret) == 0 { - panic("no return value specified for RemoveAuthDataByClientId") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(clientId, userId) @@ -396,10 +336,6 @@ func (_m *OAuthStore) RemoveAuthDataByClientId(clientId string, userId string) e func (_m *OAuthStore) RemoveAuthDataByUserId(userId string) error { ret := _m.Called(userId) - if len(ret) == 0 { - panic("no return value specified for RemoveAuthDataByUserId") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userId) @@ -414,10 +350,6 @@ func (_m *OAuthStore) RemoveAuthDataByUserId(userId string) error { func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, error) { ret := _m.Called(accessData) - if len(ret) == 0 { - panic("no return value specified for SaveAccessData") - } - var r0 *model.AccessData var r1 error if rf, ok := ret.Get(0).(func(*model.AccessData) (*model.AccessData, error)); ok { @@ -444,10 +376,6 @@ func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) (*model.Acces func (_m *OAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) { ret := _m.Called(app) - if len(ret) == 0 { - panic("no return value specified for SaveApp") - } - var r0 *model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, error)); ok { @@ -474,10 +402,6 @@ func (_m *OAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) { func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, error) { ret := _m.Called(authData) - if len(ret) == 0 { - panic("no return value specified for SaveAuthData") - } - var r0 *model.AuthData var r1 error if rf, ok := ret.Get(0).(func(*model.AuthData) (*model.AuthData, error)); ok { @@ -504,10 +428,6 @@ func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, e func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, error) { ret := _m.Called(accessData) - if len(ret) == 0 { - panic("no return value specified for UpdateAccessData") - } - var r0 *model.AccessData var r1 error if rf, ok := ret.Get(0).(func(*model.AccessData) (*model.AccessData, error)); ok { @@ -534,10 +454,6 @@ func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.Acc func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) { ret := _m.Called(app) - if len(ret) == 0 { - panic("no return value specified for UpdateApp") - } - var r0 *model.OAuthApp var r1 error if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, error)); ok { @@ -560,12 +476,13 @@ func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) { return r0, r1 } -// NewOAuthStore creates a new instance of OAuthStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewOAuthStore(t interface { +type mockConstructorTestingTNewOAuthStore interface { mock.TestingT Cleanup(func()) -}) *OAuthStore { +} + +// NewOAuthStore creates a new instance of OAuthStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewOAuthStore(t mockConstructorTestingTNewOAuthStore) *OAuthStore { mock := &OAuthStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/OutgoingOAuthConnectionStore.go b/server/channels/store/storetest/mocks/OutgoingOAuthConnectionStore.go index 3942550bcc..b02612f79b 100644 --- a/server/channels/store/storetest/mocks/OutgoingOAuthConnectionStore.go +++ b/server/channels/store/storetest/mocks/OutgoingOAuthConnectionStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type OutgoingOAuthConnectionStore struct { func (_m *OutgoingOAuthConnectionStore) DeleteConnection(c request.CTX, id string) error { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for DeleteConnection") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(c, id) @@ -37,10 +33,6 @@ func (_m *OutgoingOAuthConnectionStore) DeleteConnection(c request.CTX, id strin func (_m *OutgoingOAuthConnectionStore) GetConnection(c request.CTX, id string) (*model.OutgoingOAuthConnection, error) { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for GetConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.OutgoingOAuthConnection, error)); ok { @@ -67,10 +59,6 @@ func (_m *OutgoingOAuthConnectionStore) GetConnection(c request.CTX, id string) func (_m *OutgoingOAuthConnectionStore) GetConnections(c request.CTX, filters model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, error) { ret := _m.Called(c, filters) - if len(ret) == 0 { - panic("no return value specified for GetConnections") - } - var r0 []*model.OutgoingOAuthConnection var r1 error if rf, ok := ret.Get(0).(func(request.CTX, model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, error)); ok { @@ -97,10 +85,6 @@ func (_m *OutgoingOAuthConnectionStore) GetConnections(c request.CTX, filters mo func (_m *OutgoingOAuthConnectionStore) SaveConnection(c request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, error) { ret := _m.Called(c, conn) - if len(ret) == 0 { - panic("no return value specified for SaveConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, error)); ok { @@ -127,10 +111,6 @@ func (_m *OutgoingOAuthConnectionStore) SaveConnection(c request.CTX, conn *mode func (_m *OutgoingOAuthConnectionStore) UpdateConnection(c request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, error) { ret := _m.Called(c, conn) - if len(ret) == 0 { - panic("no return value specified for UpdateConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, error)); ok { @@ -153,12 +133,13 @@ func (_m *OutgoingOAuthConnectionStore) UpdateConnection(c request.CTX, conn *mo return r0, r1 } -// NewOutgoingOAuthConnectionStore creates a new instance of OutgoingOAuthConnectionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewOutgoingOAuthConnectionStore(t interface { +type mockConstructorTestingTNewOutgoingOAuthConnectionStore interface { mock.TestingT Cleanup(func()) -}) *OutgoingOAuthConnectionStore { +} + +// NewOutgoingOAuthConnectionStore creates a new instance of OutgoingOAuthConnectionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewOutgoingOAuthConnectionStore(t mockConstructorTestingTNewOutgoingOAuthConnectionStore) *OutgoingOAuthConnectionStore { mock := &OutgoingOAuthConnectionStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PluginStore.go b/server/channels/store/storetest/mocks/PluginStore.go index d0d0b82924..d14c45295f 100644 --- a/server/channels/store/storetest/mocks/PluginStore.go +++ b/server/channels/store/storetest/mocks/PluginStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type PluginStore struct { func (_m *PluginStore) CompareAndDelete(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) { ret := _m.Called(keyVal, oldValue) - if len(ret) == 0 { - panic("no return value specified for CompareAndDelete") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) (bool, error)); ok { @@ -46,10 +42,6 @@ func (_m *PluginStore) CompareAndDelete(keyVal *model.PluginKeyValue, oldValue [ func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) { ret := _m.Called(keyVal, oldValue) - if len(ret) == 0 { - panic("no return value specified for CompareAndSet") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) (bool, error)); ok { @@ -74,10 +66,6 @@ func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []by func (_m *PluginStore) Delete(pluginID string, key string) error { ret := _m.Called(pluginID, key) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(pluginID, key) @@ -92,10 +80,6 @@ func (_m *PluginStore) Delete(pluginID string, key string) error { func (_m *PluginStore) DeleteAllExpired() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for DeleteAllExpired") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -110,10 +94,6 @@ func (_m *PluginStore) DeleteAllExpired() error { func (_m *PluginStore) DeleteAllForPlugin(PluginID string) error { ret := _m.Called(PluginID) - if len(ret) == 0 { - panic("no return value specified for DeleteAllForPlugin") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(PluginID) @@ -128,10 +108,6 @@ func (_m *PluginStore) DeleteAllForPlugin(PluginID string) error { func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue, error) { ret := _m.Called(pluginID, key) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.PluginKeyValue var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.PluginKeyValue, error)); ok { @@ -158,10 +134,6 @@ func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue, func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, error) { ret := _m.Called(pluginID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for List") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]string, error)); ok { @@ -188,10 +160,6 @@ func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, e func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, error) { ret := _m.Called(keyVal) - if len(ret) == 0 { - panic("no return value specified for SaveOrUpdate") - } - var r0 *model.PluginKeyValue var r1 error if rf, ok := ret.Get(0).(func(*model.PluginKeyValue) (*model.PluginKeyValue, error)); ok { @@ -218,10 +186,6 @@ func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.Plugin func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) { ret := _m.Called(pluginID, key, value, options) - if len(ret) == 0 { - panic("no return value specified for SetWithOptions") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) (bool, error)); ok { @@ -242,12 +206,13 @@ func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte, return r0, r1 } -// NewPluginStore creates a new instance of PluginStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPluginStore(t interface { +type mockConstructorTestingTNewPluginStore interface { mock.TestingT Cleanup(func()) -}) *PluginStore { +} + +// NewPluginStore creates a new instance of PluginStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPluginStore(t mockConstructorTestingTNewPluginStore) *PluginStore { mock := &PluginStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PostAcknowledgementStore.go b/server/channels/store/storetest/mocks/PostAcknowledgementStore.go index 65700fcc36..637fdfa317 100644 --- a/server/channels/store/storetest/mocks/PostAcknowledgementStore.go +++ b/server/channels/store/storetest/mocks/PostAcknowledgementStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type PostAcknowledgementStore struct { func (_m *PostAcknowledgementStore) Delete(acknowledgement *model.PostAcknowledgement) error { ret := _m.Called(acknowledgement) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.PostAcknowledgement) error); ok { r0 = rf(acknowledgement) @@ -36,10 +32,6 @@ func (_m *PostAcknowledgementStore) Delete(acknowledgement *model.PostAcknowledg func (_m *PostAcknowledgementStore) Get(postID string, userID string) (*model.PostAcknowledgement, error) { ret := _m.Called(postID, userID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.PostAcknowledgement var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.PostAcknowledgement, error)); ok { @@ -66,10 +58,6 @@ func (_m *PostAcknowledgementStore) Get(postID string, userID string) (*model.Po func (_m *PostAcknowledgementStore) GetForPost(postID string) ([]*model.PostAcknowledgement, error) { ret := _m.Called(postID) - if len(ret) == 0 { - panic("no return value specified for GetForPost") - } - var r0 []*model.PostAcknowledgement var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.PostAcknowledgement, error)); ok { @@ -96,10 +84,6 @@ func (_m *PostAcknowledgementStore) GetForPost(postID string) ([]*model.PostAckn func (_m *PostAcknowledgementStore) GetForPosts(postIds []string) ([]*model.PostAcknowledgement, error) { ret := _m.Called(postIds) - if len(ret) == 0 { - panic("no return value specified for GetForPosts") - } - var r0 []*model.PostAcknowledgement var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.PostAcknowledgement, error)); ok { @@ -126,10 +110,6 @@ func (_m *PostAcknowledgementStore) GetForPosts(postIds []string) ([]*model.Post func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowledgedAt int64) (*model.PostAcknowledgement, error) { ret := _m.Called(postID, userID, acknowledgedAt) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.PostAcknowledgement var r1 error if rf, ok := ret.Get(0).(func(string, string, int64) (*model.PostAcknowledgement, error)); ok { @@ -152,12 +132,13 @@ func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowled return r0, r1 } -// NewPostAcknowledgementStore creates a new instance of PostAcknowledgementStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPostAcknowledgementStore(t interface { +type mockConstructorTestingTNewPostAcknowledgementStore interface { mock.TestingT Cleanup(func()) -}) *PostAcknowledgementStore { +} + +// NewPostAcknowledgementStore creates a new instance of PostAcknowledgementStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPostAcknowledgementStore(t mockConstructorTestingTNewPostAcknowledgementStore) *PostAcknowledgementStore { mock := &PostAcknowledgementStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PostPersistentNotificationStore.go b/server/channels/store/storetest/mocks/PostPersistentNotificationStore.go index 1792932eec..b616516d7d 100644 --- a/server/channels/store/storetest/mocks/PostPersistentNotificationStore.go +++ b/server/channels/store/storetest/mocks/PostPersistentNotificationStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type PostPersistentNotificationStore struct { func (_m *PostPersistentNotificationStore) Delete(postIds []string) error { ret := _m.Called(postIds) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func([]string) error); ok { r0 = rf(postIds) @@ -36,10 +32,6 @@ func (_m *PostPersistentNotificationStore) Delete(postIds []string) error { func (_m *PostPersistentNotificationStore) DeleteByChannel(channelIds []string) error { ret := _m.Called(channelIds) - if len(ret) == 0 { - panic("no return value specified for DeleteByChannel") - } - var r0 error if rf, ok := ret.Get(0).(func([]string) error); ok { r0 = rf(channelIds) @@ -54,10 +46,6 @@ func (_m *PostPersistentNotificationStore) DeleteByChannel(channelIds []string) func (_m *PostPersistentNotificationStore) DeleteByTeam(teamIds []string) error { ret := _m.Called(teamIds) - if len(ret) == 0 { - panic("no return value specified for DeleteByTeam") - } - var r0 error if rf, ok := ret.Get(0).(func([]string) error); ok { r0 = rf(teamIds) @@ -72,10 +60,6 @@ func (_m *PostPersistentNotificationStore) DeleteByTeam(teamIds []string) error func (_m *PostPersistentNotificationStore) DeleteExpired(maxSentCount int16) error { ret := _m.Called(maxSentCount) - if len(ret) == 0 { - panic("no return value specified for DeleteExpired") - } - var r0 error if rf, ok := ret.Get(0).(func(int16) error); ok { r0 = rf(maxSentCount) @@ -90,10 +74,6 @@ func (_m *PostPersistentNotificationStore) DeleteExpired(maxSentCount int16) err func (_m *PostPersistentNotificationStore) Get(params model.GetPersistentNotificationsPostsParams) ([]*model.PostPersistentNotifications, error) { ret := _m.Called(params) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 []*model.PostPersistentNotifications var r1 error if rf, ok := ret.Get(0).(func(model.GetPersistentNotificationsPostsParams) ([]*model.PostPersistentNotifications, error)); ok { @@ -120,10 +100,6 @@ func (_m *PostPersistentNotificationStore) Get(params model.GetPersistentNotific func (_m *PostPersistentNotificationStore) GetSingle(postID string) (*model.PostPersistentNotifications, error) { ret := _m.Called(postID) - if len(ret) == 0 { - panic("no return value specified for GetSingle") - } - var r0 *model.PostPersistentNotifications var r1 error if rf, ok := ret.Get(0).(func(string) (*model.PostPersistentNotifications, error)); ok { @@ -150,10 +126,6 @@ func (_m *PostPersistentNotificationStore) GetSingle(postID string) (*model.Post func (_m *PostPersistentNotificationStore) UpdateLastActivity(postIds []string) error { ret := _m.Called(postIds) - if len(ret) == 0 { - panic("no return value specified for UpdateLastActivity") - } - var r0 error if rf, ok := ret.Get(0).(func([]string) error); ok { r0 = rf(postIds) @@ -164,12 +136,13 @@ func (_m *PostPersistentNotificationStore) UpdateLastActivity(postIds []string) return r0 } -// NewPostPersistentNotificationStore creates a new instance of PostPersistentNotificationStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPostPersistentNotificationStore(t interface { +type mockConstructorTestingTNewPostPersistentNotificationStore interface { mock.TestingT Cleanup(func()) -}) *PostPersistentNotificationStore { +} + +// NewPostPersistentNotificationStore creates a new instance of PostPersistentNotificationStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPostPersistentNotificationStore(t mockConstructorTestingTNewPostPersistentNotificationStore) *PostPersistentNotificationStore { mock := &PostPersistentNotificationStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PostPriorityStore.go b/server/channels/store/storetest/mocks/PostPriorityStore.go index c4a0deb0e4..7192385ada 100644 --- a/server/channels/store/storetest/mocks/PostPriorityStore.go +++ b/server/channels/store/storetest/mocks/PostPriorityStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type PostPriorityStore struct { func (_m *PostPriorityStore) GetForPost(postId string) (*model.PostPriority, error) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetForPost") - } - var r0 *model.PostPriority var r1 error if rf, ok := ret.Get(0).(func(string) (*model.PostPriority, error)); ok { @@ -48,10 +44,6 @@ func (_m *PostPriorityStore) GetForPost(postId string) (*model.PostPriority, err func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, error) { ret := _m.Called(ids) - if len(ret) == 0 { - panic("no return value specified for GetForPosts") - } - var r0 []*model.PostPriority var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.PostPriority, error)); ok { @@ -74,12 +66,13 @@ func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, e return r0, r1 } -// NewPostPriorityStore creates a new instance of PostPriorityStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPostPriorityStore(t interface { +type mockConstructorTestingTNewPostPriorityStore interface { mock.TestingT Cleanup(func()) -}) *PostPriorityStore { +} + +// NewPostPriorityStore creates a new instance of PostPriorityStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPostPriorityStore(t mockConstructorTestingTNewPostPriorityStore) *PostPriorityStore { mock := &PostPriorityStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PostStore.go b/server/channels/store/storetest/mocks/PostStore.go index 871adc49ca..786affd151 100644 --- a/server/channels/store/storetest/mocks/PostStore.go +++ b/server/channels/store/storetest/mocks/PostStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,10 +24,6 @@ type PostStore struct { func (_m *PostStore) AnalyticsPostCount(options *model.PostCountOptions) (int64, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for AnalyticsPostCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*model.PostCountOptions) (int64, error)); ok { @@ -52,10 +48,6 @@ func (_m *PostStore) AnalyticsPostCount(options *model.PostCountOptions) (int64, func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for AnalyticsPostCountsByDay") - } - var r0 model.AnalyticsRows var r1 error if rf, ok := ret.Get(0).(func(*model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error)); ok { @@ -82,10 +74,6 @@ func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCounts func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for AnalyticsUserCountsWithPostsByDay") - } - var r0 model.AnalyticsRows var r1 error if rf, ok := ret.Get(0).(func(string) (model.AnalyticsRows, error)); ok { @@ -117,10 +105,6 @@ func (_m *PostStore) ClearCaches() { func (_m *PostStore) Delete(rctx request.CTX, postID string, timestamp int64, deleteByID string) error { ret := _m.Called(rctx, postID, timestamp, deleteByID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, int64, string) error); ok { r0 = rf(rctx, postID, timestamp, deleteByID) @@ -135,10 +119,6 @@ func (_m *PostStore) Delete(rctx request.CTX, postID string, timestamp int64, de func (_m *PostStore) Get(ctx context.Context, id string, opts model.GetPostsOptions, userID string, sanitizeOptions map[string]bool) (*model.PostList, error) { ret := _m.Called(ctx, id, opts, userID, sanitizeOptions) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, model.GetPostsOptions, string, map[string]bool) (*model.PostList, error)); ok { @@ -165,10 +145,6 @@ func (_m *PostStore) Get(ctx context.Context, id string, opts model.GetPostsOpti func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string, includeArchivedChannels bool) ([]*model.DirectPostForExport, error) { ret := _m.Called(limit, afterID, includeArchivedChannels) - if len(ret) == 0 { - panic("no return value specified for GetDirectPostParentsForExportAfter") - } - var r0 []*model.DirectPostForExport var r1 error if rf, ok := ret.Get(0).(func(int, string, bool) ([]*model.DirectPostForExport, error)); ok { @@ -195,10 +171,6 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID strin func (_m *PostStore) GetEditHistoryForPost(postId string) ([]*model.Post, error) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetEditHistoryForPost") - } - var r0 []*model.Post var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Post, error)); ok { @@ -225,10 +197,6 @@ func (_m *PostStore) GetEditHistoryForPost(postId string) ([]*model.Post, error) func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string { ret := _m.Called(channelID, allowFromCache, collapsedThreads) - if len(ret) == 0 { - panic("no return value specified for GetEtag") - } - var r0 string if rf, ok := ret.Get(0).(func(string, bool, bool) string); ok { r0 = rf(channelID, allowFromCache, collapsedThreads) @@ -243,10 +211,6 @@ func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThr func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetFlaggedPosts") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (*model.PostList, error)); ok { @@ -273,10 +237,6 @@ func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*mod func (_m *PostStore) GetFlaggedPostsForChannel(userID string, channelID string, offset int, limit int) (*model.PostList, error) { ret := _m.Called(userID, channelID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetFlaggedPostsForChannel") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, error)); ok { @@ -303,10 +263,6 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userID string, channelID string, func (_m *PostStore) GetFlaggedPostsForTeam(userID string, teamID string, offset int, limit int) (*model.PostList, error) { ret := _m.Called(userID, teamID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetFlaggedPostsForTeam") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, error)); ok { @@ -333,10 +289,6 @@ func (_m *PostStore) GetFlaggedPostsForTeam(userID string, teamID string, offset func (_m *PostStore) GetMaxPostSize() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetMaxPostSize") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -351,10 +303,6 @@ func (_m *PostStore) GetMaxPostSize() int { func (_m *PostStore) GetNthRecentPostTime(n int64) (int64, error) { ret := _m.Called(n) - if len(ret) == 0 { - panic("no return value specified for GetNthRecentPostTime") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok { @@ -379,10 +327,6 @@ func (_m *PostStore) GetNthRecentPostTime(n int64) (int64, error) { func (_m *PostStore) GetOldest() (*model.Post, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetOldest") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func() (*model.Post, error)); ok { @@ -409,10 +353,6 @@ func (_m *PostStore) GetOldest() (*model.Post, error) { func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetOldestEntityCreationTime") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -437,10 +377,6 @@ func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) { func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string, includeArchivedChannels bool) ([]*model.PostForExport, error) { ret := _m.Called(limit, afterID, includeArchivedChannels) - if len(ret) == 0 { - panic("no return value specified for GetParentsForExportAfter") - } - var r0 []*model.PostForExport var r1 error if rf, ok := ret.Get(0).(func(int, string, bool) ([]*model.PostForExport, error)); ok { @@ -467,10 +403,6 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string, include func (_m *PostStore) GetPostAfterTime(channelID string, timestamp int64, collapsedThreads bool) (*model.Post, error) { ret := _m.Called(channelID, timestamp, collapsedThreads) - if len(ret) == 0 { - panic("no return value specified for GetPostAfterTime") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func(string, int64, bool) (*model.Post, error)); ok { @@ -497,10 +429,6 @@ func (_m *PostStore) GetPostAfterTime(channelID string, timestamp int64, collaps func (_m *PostStore) GetPostIdAfterTime(channelID string, timestamp int64, collapsedThreads bool) (string, error) { ret := _m.Called(channelID, timestamp, collapsedThreads) - if len(ret) == 0 { - panic("no return value specified for GetPostIdAfterTime") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, int64, bool) (string, error)); ok { @@ -525,10 +453,6 @@ func (_m *PostStore) GetPostIdAfterTime(channelID string, timestamp int64, colla func (_m *PostStore) GetPostIdBeforeTime(channelID string, timestamp int64, collapsedThreads bool) (string, error) { ret := _m.Called(channelID, timestamp, collapsedThreads) - if len(ret) == 0 { - panic("no return value specified for GetPostIdBeforeTime") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, int64, bool) (string, error)); ok { @@ -553,10 +477,6 @@ func (_m *PostStore) GetPostIdBeforeTime(channelID string, timestamp int64, coll func (_m *PostStore) GetPostReminderMetadata(postID string) (*store.PostReminderMetadata, error) { ret := _m.Called(postID) - if len(ret) == 0 { - panic("no return value specified for GetPostReminderMetadata") - } - var r0 *store.PostReminderMetadata var r1 error if rf, ok := ret.Get(0).(func(string) (*store.PostReminderMetadata, error)); ok { @@ -583,10 +503,6 @@ func (_m *PostStore) GetPostReminderMetadata(postID string) (*store.PostReminder func (_m *PostStore) GetPostReminders(now int64) ([]*model.PostReminder, error) { ret := _m.Called(now) - if len(ret) == 0 { - panic("no return value specified for GetPostReminders") - } - var r0 []*model.PostReminder var r1 error if rf, ok := ret.Get(0).(func(int64) ([]*model.PostReminder, error)); ok { @@ -613,10 +529,6 @@ func (_m *PostStore) GetPostReminders(now int64) ([]*model.PostReminder, error) func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool, sanitizeOptions map[string]bool) (*model.PostList, error) { ret := _m.Called(options, allowFromCache, sanitizeOptions) - if len(ret) == 0 { - panic("no return value specified for GetPosts") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(model.GetPostsOptions, bool, map[string]bool) (*model.PostList, error)); ok { @@ -643,10 +555,6 @@ func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions, sanitizeOptions map[string]bool) (*model.PostList, error) { ret := _m.Called(options, sanitizeOptions) - if len(ret) == 0 { - panic("no return value specified for GetPostsAfter") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) (*model.PostList, error)); ok { @@ -673,10 +581,6 @@ func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions, sanitizeOption func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, startPostID string, limit int) ([]*model.PostForIndexing, error) { ret := _m.Called(startTime, startPostID, limit) - if len(ret) == 0 { - panic("no return value specified for GetPostsBatchForIndexing") - } - var r0 []*model.PostForIndexing var r1 error if rf, ok := ret.Get(0).(func(int64, string, int) ([]*model.PostForIndexing, error)); ok { @@ -703,10 +607,6 @@ func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, startPostID strin func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions, sanitizeOptions map[string]bool) (*model.PostList, error) { ret := _m.Called(options, sanitizeOptions) - if len(ret) == 0 { - panic("no return value specified for GetPostsBefore") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) (*model.PostList, error)); ok { @@ -733,10 +633,6 @@ func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions, sanitizeOptio func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) { ret := _m.Called(postIds) - if len(ret) == 0 { - panic("no return value specified for GetPostsByIds") - } - var r0 []*model.Post var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Post, error)); ok { @@ -763,10 +659,6 @@ func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) { func (_m *PostStore) GetPostsByThread(threadID string, since int64) ([]*model.Post, error) { ret := _m.Called(threadID, since) - if len(ret) == 0 { - panic("no return value specified for GetPostsByThread") - } - var r0 []*model.Post var r1 error if rf, ok := ret.Get(0).(func(string, int64) ([]*model.Post, error)); ok { @@ -793,10 +685,6 @@ func (_m *PostStore) GetPostsByThread(threadID string, since int64) ([]*model.Po func (_m *PostStore) GetPostsCreatedAt(channelID string, timestamp int64) ([]*model.Post, error) { ret := _m.Called(channelID, timestamp) - if len(ret) == 0 { - panic("no return value specified for GetPostsCreatedAt") - } - var r0 []*model.Post var r1 error if rf, ok := ret.Get(0).(func(string, int64) ([]*model.Post, error)); ok { @@ -823,10 +711,6 @@ func (_m *PostStore) GetPostsCreatedAt(channelID string, timestamp int64) ([]*mo func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool, sanitizeOptions map[string]bool) (*model.PostList, error) { ret := _m.Called(options, allowFromCache, sanitizeOptions) - if len(ret) == 0 { - panic("no return value specified for GetPostsSince") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, bool, map[string]bool) (*model.PostList, error)); ok { @@ -853,10 +737,6 @@ func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFrom func (_m *PostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOptions, cursor model.GetPostsSinceForSyncCursor, limit int) ([]*model.Post, model.GetPostsSinceForSyncCursor, error) { ret := _m.Called(options, cursor, limit) - if len(ret) == 0 { - panic("no return value specified for GetPostsSinceForSync") - } - var r0 []*model.Post var r1 model.GetPostsSinceForSyncCursor var r2 error @@ -890,10 +770,6 @@ func (_m *PostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOpti func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error) { ret := _m.Called(parentID) - if len(ret) == 0 { - panic("no return value specified for GetRepliesForExport") - } - var r0 []*model.ReplyForExport var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.ReplyForExport, error)); ok { @@ -920,10 +796,6 @@ func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExpo func (_m *PostStore) GetSingle(id string, inclDeleted bool) (*model.Post, error) { ret := _m.Called(id, inclDeleted) - if len(ret) == 0 { - panic("no return value specified for GetSingle") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.Post, error)); ok { @@ -950,10 +822,6 @@ func (_m *PostStore) GetSingle(id string, inclDeleted bool) (*model.Post, error) func (_m *PostStore) HasAutoResponsePostByUserSince(options model.GetPostsSinceOptions, userId string) (bool, error) { ret := _m.Called(options, userId) - if len(ret) == 0 { - panic("no return value specified for HasAutoResponsePostByUserSince") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, string) (bool, error)); ok { @@ -983,10 +851,6 @@ func (_m *PostStore) InvalidateLastPostTimeCache(channelID string) { func (_m *PostStore) Overwrite(rctx request.CTX, post *model.Post) (*model.Post, error) { ret := _m.Called(rctx, post) - if len(ret) == 0 { - panic("no return value specified for Overwrite") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Post) (*model.Post, error)); ok { @@ -1013,10 +877,6 @@ func (_m *PostStore) Overwrite(rctx request.CTX, post *model.Post) (*model.Post, func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, error) { ret := _m.Called(posts) - if len(ret) == 0 { - panic("no return value specified for OverwriteMultiple") - } - var r0 []*model.Post var r1 int var r2 error @@ -1050,10 +910,6 @@ func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) { ret := _m.Called(endTime, limit) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatch") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok { @@ -1078,10 +934,6 @@ func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, er func (_m *PostStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalPolicyEndTime int64, limit int64, cursor model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error) { ret := _m.Called(now, globalPolicyEndTime, limit, cursor) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatchForRetentionPolicies") - } - var r0 int64 var r1 model.RetentionPolicyCursor var r2 error @@ -1113,10 +965,6 @@ func (_m *PostStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalP func (_m *PostStore) PermanentDeleteByChannel(rctx request.CTX, channelID string) error { ret := _m.Called(rctx, channelID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(rctx, channelID) @@ -1131,10 +979,6 @@ func (_m *PostStore) PermanentDeleteByChannel(rctx request.CTX, channelID string func (_m *PostStore) PermanentDeleteByUser(rctx request.CTX, userID string) error { ret := _m.Called(rctx, userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(rctx, userID) @@ -1149,10 +993,6 @@ func (_m *PostStore) PermanentDeleteByUser(rctx request.CTX, userID string) erro func (_m *PostStore) Save(rctx request.CTX, post *model.Post) (*model.Post, error) { ret := _m.Called(rctx, post) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Post) (*model.Post, error)); ok { @@ -1179,10 +1019,6 @@ func (_m *PostStore) Save(rctx request.CTX, post *model.Post) (*model.Post, erro func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, error) { ret := _m.Called(posts) - if len(ret) == 0 { - panic("no return value specified for SaveMultiple") - } - var r0 []*model.Post var r1 int var r2 error @@ -1216,10 +1052,6 @@ func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, erro func (_m *PostStore) Search(teamID string, userID string, params *model.SearchParams) (*model.PostList, error) { ret := _m.Called(teamID, userID, params) - if len(ret) == 0 { - panic("no return value specified for Search") - } - var r0 *model.PostList var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) (*model.PostList, error)); ok { @@ -1246,10 +1078,6 @@ func (_m *PostStore) Search(teamID string, userID string, params *model.SearchPa func (_m *PostStore) SearchPostsForUser(rctx request.CTX, paramsList []*model.SearchParams, userID string, teamID string, page int, perPage int) (*model.PostSearchResults, error) { ret := _m.Called(rctx, paramsList, userID, teamID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for SearchPostsForUser") - } - var r0 *model.PostSearchResults var r1 error if rf, ok := ret.Get(0).(func(request.CTX, []*model.SearchParams, string, string, int, int) (*model.PostSearchResults, error)); ok { @@ -1276,10 +1104,6 @@ func (_m *PostStore) SearchPostsForUser(rctx request.CTX, paramsList []*model.Se func (_m *PostStore) SetPostReminder(reminder *model.PostReminder) error { ret := _m.Called(reminder) - if len(ret) == 0 { - panic("no return value specified for SetPostReminder") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.PostReminder) error); ok { r0 = rf(reminder) @@ -1294,10 +1118,6 @@ func (_m *PostStore) SetPostReminder(reminder *model.PostReminder) error { func (_m *PostStore) Update(rctx request.CTX, newPost *model.Post, oldPost *model.Post) (*model.Post, error) { ret := _m.Called(rctx, newPost, oldPost) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Post var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Post) (*model.Post, error)); ok { @@ -1320,12 +1140,13 @@ func (_m *PostStore) Update(rctx request.CTX, newPost *model.Post, oldPost *mode return r0, r1 } -// NewPostStore creates a new instance of PostStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPostStore(t interface { +type mockConstructorTestingTNewPostStore interface { mock.TestingT Cleanup(func()) -}) *PostStore { +} + +// NewPostStore creates a new instance of PostStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPostStore(t mockConstructorTestingTNewPostStore) *PostStore { mock := &PostStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/PreferenceStore.go b/server/channels/store/storetest/mocks/PreferenceStore.go index 9f0a1f9eaa..df570597dc 100644 --- a/server/channels/store/storetest/mocks/PreferenceStore.go +++ b/server/channels/store/storetest/mocks/PreferenceStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type PreferenceStore struct { func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) { ret := _m.Called(limit) - if len(ret) == 0 { - panic("no return value specified for CleanupFlagsBatch") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok { @@ -46,10 +42,6 @@ func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) { func (_m *PreferenceStore) Delete(userID string, category string, name string) error { ret := _m.Called(userID, category, name) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(userID, category, name) @@ -64,10 +56,6 @@ func (_m *PreferenceStore) Delete(userID string, category string, name string) e func (_m *PreferenceStore) DeleteCategory(userID string, category string) error { ret := _m.Called(userID, category) - if len(ret) == 0 { - panic("no return value specified for DeleteCategory") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, category) @@ -82,10 +70,6 @@ func (_m *PreferenceStore) DeleteCategory(userID string, category string) error func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) error { ret := _m.Called(category, name) - if len(ret) == 0 { - panic("no return value specified for DeleteCategoryAndName") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(category, name) @@ -100,10 +84,6 @@ func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) e func (_m *PreferenceStore) DeleteOrphanedRows(limit int) (int64, error) { ret := _m.Called(limit) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanedRows") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int) (int64, error)); ok { @@ -128,10 +108,6 @@ func (_m *PreferenceStore) DeleteOrphanedRows(limit int) (int64, error) { func (_m *PreferenceStore) Get(userID string, category string, name string) (*model.Preference, error) { ret := _m.Called(userID, category, name) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Preference var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (*model.Preference, error)); ok { @@ -158,10 +134,6 @@ func (_m *PreferenceStore) Get(userID string, category string, name string) (*mo func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 model.Preferences var r1 error if rf, ok := ret.Get(0).(func(string) (model.Preferences, error)); ok { @@ -188,10 +160,6 @@ func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) { func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Preferences, error) { ret := _m.Called(userID, category) - if len(ret) == 0 { - panic("no return value specified for GetCategory") - } - var r0 model.Preferences var r1 error if rf, ok := ret.Get(0).(func(string, string) (model.Preferences, error)); ok { @@ -218,10 +186,6 @@ func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Pr func (_m *PreferenceStore) GetCategoryAndName(category string, nane string) (model.Preferences, error) { ret := _m.Called(category, nane) - if len(ret) == 0 { - panic("no return value specified for GetCategoryAndName") - } - var r0 model.Preferences var r1 error if rf, ok := ret.Get(0).(func(string, string) (model.Preferences, error)); ok { @@ -248,10 +212,6 @@ func (_m *PreferenceStore) GetCategoryAndName(category string, nane string) (mod func (_m *PreferenceStore) PermanentDeleteByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -266,10 +226,6 @@ func (_m *PreferenceStore) PermanentDeleteByUser(userID string) error { func (_m *PreferenceStore) Save(preferences model.Preferences) error { ret := _m.Called(preferences) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(model.Preferences) error); ok { r0 = rf(preferences) @@ -280,12 +236,13 @@ func (_m *PreferenceStore) Save(preferences model.Preferences) error { return r0 } -// NewPreferenceStore creates a new instance of PreferenceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPreferenceStore(t interface { +type mockConstructorTestingTNewPreferenceStore interface { mock.TestingT Cleanup(func()) -}) *PreferenceStore { +} + +// NewPreferenceStore creates a new instance of PreferenceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPreferenceStore(t mockConstructorTestingTNewPreferenceStore) *PreferenceStore { mock := &PreferenceStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ProductNoticesStore.go b/server/channels/store/storetest/mocks/ProductNoticesStore.go index 8a978caf6c..3cd63083e7 100644 --- a/server/channels/store/storetest/mocks/ProductNoticesStore.go +++ b/server/channels/store/storetest/mocks/ProductNoticesStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type ProductNoticesStore struct { func (_m *ProductNoticesStore) Clear(notices []string) error { ret := _m.Called(notices) - if len(ret) == 0 { - panic("no return value specified for Clear") - } - var r0 error if rf, ok := ret.Get(0).(func([]string) error); ok { r0 = rf(notices) @@ -36,10 +32,6 @@ func (_m *ProductNoticesStore) Clear(notices []string) error { func (_m *ProductNoticesStore) ClearOldNotices(currentNotices model.ProductNotices) error { ret := _m.Called(currentNotices) - if len(ret) == 0 { - panic("no return value specified for ClearOldNotices") - } - var r0 error if rf, ok := ret.Get(0).(func(model.ProductNotices) error); ok { r0 = rf(currentNotices) @@ -54,10 +46,6 @@ func (_m *ProductNoticesStore) ClearOldNotices(currentNotices model.ProductNotic func (_m *ProductNoticesStore) GetViews(userID string) ([]model.ProductNoticeViewState, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetViews") - } - var r0 []model.ProductNoticeViewState var r1 error if rf, ok := ret.Get(0).(func(string) ([]model.ProductNoticeViewState, error)); ok { @@ -84,10 +72,6 @@ func (_m *ProductNoticesStore) GetViews(userID string) ([]model.ProductNoticeVie func (_m *ProductNoticesStore) View(userID string, notices []string) error { ret := _m.Called(userID, notices) - if len(ret) == 0 { - panic("no return value specified for View") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(userID, notices) @@ -98,12 +82,13 @@ func (_m *ProductNoticesStore) View(userID string, notices []string) error { return r0 } -// NewProductNoticesStore creates a new instance of ProductNoticesStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewProductNoticesStore(t interface { +type mockConstructorTestingTNewProductNoticesStore interface { mock.TestingT Cleanup(func()) -}) *ProductNoticesStore { +} + +// NewProductNoticesStore creates a new instance of ProductNoticesStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewProductNoticesStore(t mockConstructorTestingTNewProductNoticesStore) *ProductNoticesStore { mock := &ProductNoticesStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ReactionStore.go b/server/channels/store/storetest/mocks/ReactionStore.go index 8dd77aa518..aa023b3b29 100644 --- a/server/channels/store/storetest/mocks/ReactionStore.go +++ b/server/channels/store/storetest/mocks/ReactionStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type ReactionStore struct { func (_m *ReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, error) { ret := _m.Called(postIds) - if len(ret) == 0 { - panic("no return value specified for BulkGetForPosts") - } - var r0 []*model.Reaction var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Reaction, error)); ok { @@ -48,10 +44,6 @@ func (_m *ReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, e func (_m *ReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, error) { ret := _m.Called(reaction) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 *model.Reaction var r1 error if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, error)); ok { @@ -78,10 +70,6 @@ func (_m *ReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, erro func (_m *ReactionStore) DeleteAllWithEmojiName(emojiName string) error { ret := _m.Called(emojiName) - if len(ret) == 0 { - panic("no return value specified for DeleteAllWithEmojiName") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(emojiName) @@ -96,10 +84,6 @@ func (_m *ReactionStore) DeleteAllWithEmojiName(emojiName string) error { func (_m *ReactionStore) DeleteOrphanedRowsByIds(r *model.RetentionIdsForDeletion) error { ret := _m.Called(r) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanedRowsByIds") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.RetentionIdsForDeletion) error); ok { r0 = rf(r) @@ -114,10 +98,6 @@ func (_m *ReactionStore) DeleteOrphanedRowsByIds(r *model.RetentionIdsForDeletio func (_m *ReactionStore) ExistsOnPost(postId string, emojiName string) (bool, error) { ret := _m.Called(postId, emojiName) - if len(ret) == 0 { - panic("no return value specified for ExistsOnPost") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -142,10 +122,6 @@ func (_m *ReactionStore) ExistsOnPost(postId string, emojiName string) (bool, er func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*model.Reaction, error) { ret := _m.Called(postID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetForPost") - } - var r0 []*model.Reaction var r1 error if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Reaction, error)); ok { @@ -172,10 +148,6 @@ func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*mode func (_m *ReactionStore) GetForPostSince(postId string, since int64, excludeRemoteId string, inclDeleted bool) ([]*model.Reaction, error) { ret := _m.Called(postId, since, excludeRemoteId, inclDeleted) - if len(ret) == 0 { - panic("no return value specified for GetForPostSince") - } - var r0 []*model.Reaction var r1 error if rf, ok := ret.Get(0).(func(string, int64, string, bool) ([]*model.Reaction, error)); ok { @@ -202,10 +174,6 @@ func (_m *ReactionStore) GetForPostSince(postId string, since int64, excludeRemo func (_m *ReactionStore) GetUniqueCountForPost(postId string) (int, error) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetUniqueCountForPost") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -230,10 +198,6 @@ func (_m *ReactionStore) GetUniqueCountForPost(postId string) (int, error) { func (_m *ReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) { ret := _m.Called(endTime, limit) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatch") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok { @@ -258,10 +222,6 @@ func (_m *ReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64 func (_m *ReactionStore) PermanentDeleteByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -276,10 +236,6 @@ func (_m *ReactionStore) PermanentDeleteByUser(userID string) error { func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error) { ret := _m.Called(reaction) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Reaction var r1 error if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, error)); ok { @@ -302,12 +258,13 @@ func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error) return r0, r1 } -// NewReactionStore creates a new instance of ReactionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReactionStore(t interface { +type mockConstructorTestingTNewReactionStore interface { mock.TestingT Cleanup(func()) -}) *ReactionStore { +} + +// NewReactionStore creates a new instance of ReactionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewReactionStore(t mockConstructorTestingTNewReactionStore) *ReactionStore { mock := &ReactionStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/RemoteClusterStore.go b/server/channels/store/storetest/mocks/RemoteClusterStore.go index c44bebd37a..f9c29193d4 100644 --- a/server/channels/store/storetest/mocks/RemoteClusterStore.go +++ b/server/channels/store/storetest/mocks/RemoteClusterStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type RemoteClusterStore struct { func (_m *RemoteClusterStore) Delete(remoteClusterId string) (bool, error) { ret := _m.Called(remoteClusterId) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -46,10 +42,6 @@ func (_m *RemoteClusterStore) Delete(remoteClusterId string) (bool, error) { func (_m *RemoteClusterStore) Get(remoteClusterId string) (*model.RemoteCluster, error) { ret := _m.Called(remoteClusterId) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(string) (*model.RemoteCluster, error)); ok { @@ -76,10 +68,6 @@ func (_m *RemoteClusterStore) Get(remoteClusterId string) (*model.RemoteCluster, func (_m *RemoteClusterStore) GetAll(filter model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, error) { ret := _m.Called(filter) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, error)); ok { @@ -106,10 +94,6 @@ func (_m *RemoteClusterStore) GetAll(filter model.RemoteClusterQueryFilter) ([]* func (_m *RemoteClusterStore) GetByPluginID(pluginID string) (*model.RemoteCluster, error) { ret := _m.Called(pluginID) - if len(ret) == 0 { - panic("no return value specified for GetByPluginID") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(string) (*model.RemoteCluster, error)); ok { @@ -136,10 +120,6 @@ func (_m *RemoteClusterStore) GetByPluginID(pluginID string) (*model.RemoteClust func (_m *RemoteClusterStore) Save(rc *model.RemoteCluster) (*model.RemoteCluster, error) { ret := _m.Called(rc) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(*model.RemoteCluster) (*model.RemoteCluster, error)); ok { @@ -166,10 +146,6 @@ func (_m *RemoteClusterStore) Save(rc *model.RemoteCluster) (*model.RemoteCluste func (_m *RemoteClusterStore) SetLastPingAt(remoteClusterId string) error { ret := _m.Called(remoteClusterId) - if len(ret) == 0 { - panic("no return value specified for SetLastPingAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(remoteClusterId) @@ -184,10 +160,6 @@ func (_m *RemoteClusterStore) SetLastPingAt(remoteClusterId string) error { func (_m *RemoteClusterStore) Update(rc *model.RemoteCluster) (*model.RemoteCluster, error) { ret := _m.Called(rc) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(*model.RemoteCluster) (*model.RemoteCluster, error)); ok { @@ -214,10 +186,6 @@ func (_m *RemoteClusterStore) Update(rc *model.RemoteCluster) (*model.RemoteClus func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string) (*model.RemoteCluster, error) { ret := _m.Called(remoteClusterId, topics) - if len(ret) == 0 { - panic("no return value specified for UpdateTopics") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.RemoteCluster, error)); ok { @@ -240,12 +208,13 @@ func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string return r0, r1 } -// NewRemoteClusterStore creates a new instance of RemoteClusterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRemoteClusterStore(t interface { +type mockConstructorTestingTNewRemoteClusterStore interface { mock.TestingT Cleanup(func()) -}) *RemoteClusterStore { +} + +// NewRemoteClusterStore creates a new instance of RemoteClusterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewRemoteClusterStore(t mockConstructorTestingTNewRemoteClusterStore) *RemoteClusterStore { mock := &RemoteClusterStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/RetentionPolicyStore.go b/server/channels/store/storetest/mocks/RetentionPolicyStore.go index 752b1efae0..fa20e4b5c9 100644 --- a/server/channels/store/storetest/mocks/RetentionPolicyStore.go +++ b/server/channels/store/storetest/mocks/RetentionPolicyStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type RetentionPolicyStore struct { func (_m *RetentionPolicyStore) AddChannels(policyId string, channelIds []string) error { ret := _m.Called(policyId, channelIds) - if len(ret) == 0 { - panic("no return value specified for AddChannels") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(policyId, channelIds) @@ -36,10 +32,6 @@ func (_m *RetentionPolicyStore) AddChannels(policyId string, channelIds []string func (_m *RetentionPolicyStore) AddTeams(policyId string, teamIds []string) error { ret := _m.Called(policyId, teamIds) - if len(ret) == 0 { - panic("no return value specified for AddTeams") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(policyId, teamIds) @@ -54,10 +46,6 @@ func (_m *RetentionPolicyStore) AddTeams(policyId string, teamIds []string) erro func (_m *RetentionPolicyStore) Delete(id string) error { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(id) @@ -72,10 +60,6 @@ func (_m *RetentionPolicyStore) Delete(id string) error { func (_m *RetentionPolicyStore) DeleteOrphanedRows(limit int) (int64, error) { ret := _m.Called(limit) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanedRows") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int) (int64, error)); ok { @@ -100,10 +84,6 @@ func (_m *RetentionPolicyStore) DeleteOrphanedRows(limit int) (int64, error) { func (_m *RetentionPolicyStore) Get(id string) (*model.RetentionPolicyWithTeamAndChannelCounts, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 error if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok { @@ -130,10 +110,6 @@ func (_m *RetentionPolicyStore) Get(id string) (*model.RetentionPolicyWithTeamAn func (_m *RetentionPolicyStore) GetAll(offset int, limit int) ([]*model.RetentionPolicyWithTeamAndChannelCounts, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.RetentionPolicyWithTeamAndChannelCounts var r1 error if rf, ok := ret.Get(0).(func(int, int) ([]*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok { @@ -160,10 +136,6 @@ func (_m *RetentionPolicyStore) GetAll(offset int, limit int) ([]*model.Retentio func (_m *RetentionPolicyStore) GetChannelPoliciesCountForUser(userID string) (int64, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelPoliciesCountForUser") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -188,10 +160,6 @@ func (_m *RetentionPolicyStore) GetChannelPoliciesCountForUser(userID string) (i func (_m *RetentionPolicyStore) GetChannelPoliciesForUser(userID string, offset int, limit int) ([]*model.RetentionPolicyForChannel, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannelPoliciesForUser") - } - var r0 []*model.RetentionPolicyForChannel var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.RetentionPolicyForChannel, error)); ok { @@ -218,10 +186,6 @@ func (_m *RetentionPolicyStore) GetChannelPoliciesForUser(userID string, offset func (_m *RetentionPolicyStore) GetChannels(policyId string, offset int, limit int) (model.ChannelListWithTeamData, error) { ret := _m.Called(policyId, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannels") - } - var r0 model.ChannelListWithTeamData var r1 error if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelListWithTeamData, error)); ok { @@ -248,10 +212,6 @@ func (_m *RetentionPolicyStore) GetChannels(policyId string, offset int, limit i func (_m *RetentionPolicyStore) GetChannelsCount(policyId string) (int64, error) { ret := _m.Called(policyId) - if len(ret) == 0 { - panic("no return value specified for GetChannelsCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -276,10 +236,6 @@ func (_m *RetentionPolicyStore) GetChannelsCount(policyId string) (int64, error) func (_m *RetentionPolicyStore) GetCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -304,10 +260,6 @@ func (_m *RetentionPolicyStore) GetCount() (int64, error) { func (_m *RetentionPolicyStore) GetIdsForDeletionByTableName(tableName string, limit int) ([]*model.RetentionIdsForDeletion, error) { ret := _m.Called(tableName, limit) - if len(ret) == 0 { - panic("no return value specified for GetIdsForDeletionByTableName") - } - var r0 []*model.RetentionIdsForDeletion var r1 error if rf, ok := ret.Get(0).(func(string, int) ([]*model.RetentionIdsForDeletion, error)); ok { @@ -334,10 +286,6 @@ func (_m *RetentionPolicyStore) GetIdsForDeletionByTableName(tableName string, l func (_m *RetentionPolicyStore) GetTeamPoliciesCountForUser(userID string) (int64, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamPoliciesCountForUser") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -362,10 +310,6 @@ func (_m *RetentionPolicyStore) GetTeamPoliciesCountForUser(userID string) (int6 func (_m *RetentionPolicyStore) GetTeamPoliciesForUser(userID string, offset int, limit int) ([]*model.RetentionPolicyForTeam, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetTeamPoliciesForUser") - } - var r0 []*model.RetentionPolicyForTeam var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.RetentionPolicyForTeam, error)); ok { @@ -392,10 +336,6 @@ func (_m *RetentionPolicyStore) GetTeamPoliciesForUser(userID string, offset int func (_m *RetentionPolicyStore) GetTeams(policyId string, offset int, limit int) ([]*model.Team, error) { ret := _m.Called(policyId, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetTeams") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Team, error)); ok { @@ -422,10 +362,6 @@ func (_m *RetentionPolicyStore) GetTeams(policyId string, offset int, limit int) func (_m *RetentionPolicyStore) GetTeamsCount(policyId string) (int64, error) { ret := _m.Called(policyId) - if len(ret) == 0 { - panic("no return value specified for GetTeamsCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -450,10 +386,6 @@ func (_m *RetentionPolicyStore) GetTeamsCount(policyId string) (int64, error) { func (_m *RetentionPolicyStore) Patch(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error) { ret := _m.Called(patch) - if len(ret) == 0 { - panic("no return value specified for Patch") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 error if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok { @@ -480,10 +412,6 @@ func (_m *RetentionPolicyStore) Patch(patch *model.RetentionPolicyWithTeamAndCha func (_m *RetentionPolicyStore) RemoveChannels(policyId string, channelIds []string) error { ret := _m.Called(policyId, channelIds) - if len(ret) == 0 { - panic("no return value specified for RemoveChannels") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(policyId, channelIds) @@ -498,10 +426,6 @@ func (_m *RetentionPolicyStore) RemoveChannels(policyId string, channelIds []str func (_m *RetentionPolicyStore) RemoveTeams(policyId string, teamIds []string) error { ret := _m.Called(policyId, teamIds) - if len(ret) == 0 { - panic("no return value specified for RemoveTeams") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(policyId, teamIds) @@ -516,10 +440,6 @@ func (_m *RetentionPolicyStore) RemoveTeams(policyId string, teamIds []string) e func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error) { ret := _m.Called(policy) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 error if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok { @@ -542,12 +462,13 @@ func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndCha return r0, r1 } -// NewRetentionPolicyStore creates a new instance of RetentionPolicyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRetentionPolicyStore(t interface { +type mockConstructorTestingTNewRetentionPolicyStore interface { mock.TestingT Cleanup(func()) -}) *RetentionPolicyStore { +} + +// NewRetentionPolicyStore creates a new instance of RetentionPolicyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewRetentionPolicyStore(t mockConstructorTestingTNewRetentionPolicyStore) *RetentionPolicyStore { mock := &RetentionPolicyStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/RoleStore.go b/server/channels/store/storetest/mocks/RoleStore.go index f31a860673..f24a4e0416 100644 --- a/server/channels/store/storetest/mocks/RoleStore.go +++ b/server/channels/store/storetest/mocks/RoleStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -20,10 +20,6 @@ type RoleStore struct { func (_m *RoleStore) AllChannelSchemeRoles() ([]*model.Role, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for AllChannelSchemeRoles") - } - var r0 []*model.Role var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Role, error)); ok { @@ -50,10 +46,6 @@ func (_m *RoleStore) AllChannelSchemeRoles() ([]*model.Role, error) { func (_m *RoleStore) ChannelHigherScopedPermissions(roleNames []string) (map[string]*model.RolePermissions, error) { ret := _m.Called(roleNames) - if len(ret) == 0 { - panic("no return value specified for ChannelHigherScopedPermissions") - } - var r0 map[string]*model.RolePermissions var r1 error if rf, ok := ret.Get(0).(func([]string) (map[string]*model.RolePermissions, error)); ok { @@ -80,10 +72,6 @@ func (_m *RoleStore) ChannelHigherScopedPermissions(roleNames []string) (map[str func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role, error) { ret := _m.Called(roleName) - if len(ret) == 0 { - panic("no return value specified for ChannelRolesUnderTeamRole") - } - var r0 []*model.Role var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Role, error)); ok { @@ -110,10 +98,6 @@ func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role, func (_m *RoleStore) Delete(roleID string) (*model.Role, error) { ret := _m.Called(roleID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 *model.Role var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Role, error)); ok { @@ -140,10 +124,6 @@ func (_m *RoleStore) Delete(roleID string) (*model.Role, error) { func (_m *RoleStore) Get(roleID string) (*model.Role, error) { ret := _m.Called(roleID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Role var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Role, error)); ok { @@ -170,10 +150,6 @@ func (_m *RoleStore) Get(roleID string) (*model.Role, error) { func (_m *RoleStore) GetAll() ([]*model.Role, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.Role var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Role, error)); ok { @@ -200,10 +176,6 @@ func (_m *RoleStore) GetAll() ([]*model.Role, error) { func (_m *RoleStore) GetByName(ctx context.Context, name string) (*model.Role, error) { ret := _m.Called(ctx, name) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Role var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, error)); ok { @@ -230,10 +202,6 @@ func (_m *RoleStore) GetByName(ctx context.Context, name string) (*model.Role, e func (_m *RoleStore) GetByNames(names []string) ([]*model.Role, error) { ret := _m.Called(names) - if len(ret) == 0 { - panic("no return value specified for GetByNames") - } - var r0 []*model.Role var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Role, error)); ok { @@ -260,10 +228,6 @@ func (_m *RoleStore) GetByNames(names []string) ([]*model.Role, error) { func (_m *RoleStore) PermanentDeleteAll() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteAll") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -278,10 +242,6 @@ func (_m *RoleStore) PermanentDeleteAll() error { func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) { ret := _m.Called(role) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Role var r1 error if rf, ok := ret.Get(0).(func(*model.Role) (*model.Role, error)); ok { @@ -304,12 +264,13 @@ func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) { return r0, r1 } -// NewRoleStore creates a new instance of RoleStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRoleStore(t interface { +type mockConstructorTestingTNewRoleStore interface { mock.TestingT Cleanup(func()) -}) *RoleStore { +} + +// NewRoleStore creates a new instance of RoleStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewRoleStore(t mockConstructorTestingTNewRoleStore) *RoleStore { mock := &RoleStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/SchemeStore.go b/server/channels/store/storetest/mocks/SchemeStore.go index 443d8d1b0e..0dabbdb140 100644 --- a/server/channels/store/storetest/mocks/SchemeStore.go +++ b/server/channels/store/storetest/mocks/SchemeStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type SchemeStore struct { func (_m *SchemeStore) CountByScope(scope string) (int64, error) { ret := _m.Called(scope) - if len(ret) == 0 { - panic("no return value specified for CountByScope") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -46,10 +42,6 @@ func (_m *SchemeStore) CountByScope(scope string) (int64, error) { func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error) { ret := _m.Called(scope, permissionID, roleScope, roleType) - if len(ret) == 0 { - panic("no return value specified for CountWithoutPermission") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, model.RoleScope, model.RoleType) (int64, error)); ok { @@ -74,10 +66,6 @@ func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string, func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) { ret := _m.Called(schemeID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 *model.Scheme var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok { @@ -104,10 +92,6 @@ func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) { func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) { ret := _m.Called(schemeID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Scheme var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok { @@ -134,10 +118,6 @@ func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) { func (_m *SchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, error) { ret := _m.Called(scope, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAllPage") - } - var r0 []*model.Scheme var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, error)); ok { @@ -164,10 +144,6 @@ func (_m *SchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model func (_m *SchemeStore) GetByName(schemeName string) (*model.Scheme, error) { ret := _m.Called(schemeName) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Scheme var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok { @@ -194,10 +170,6 @@ func (_m *SchemeStore) GetByName(schemeName string) (*model.Scheme, error) { func (_m *SchemeStore) PermanentDeleteAll() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteAll") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -212,10 +184,6 @@ func (_m *SchemeStore) PermanentDeleteAll() error { func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) { ret := _m.Called(scheme) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Scheme var r1 error if rf, ok := ret.Get(0).(func(*model.Scheme) (*model.Scheme, error)); ok { @@ -238,12 +206,13 @@ func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) { return r0, r1 } -// NewSchemeStore creates a new instance of SchemeStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSchemeStore(t interface { +type mockConstructorTestingTNewSchemeStore interface { mock.TestingT Cleanup(func()) -}) *SchemeStore { +} + +// NewSchemeStore creates a new instance of SchemeStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSchemeStore(t mockConstructorTestingTNewSchemeStore) *SchemeStore { mock := &SchemeStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/SessionStore.go b/server/channels/store/storetest/mocks/SessionStore.go index 590aef856d..f658d1c72a 100644 --- a/server/channels/store/storetest/mocks/SessionStore.go +++ b/server/channels/store/storetest/mocks/SessionStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type SessionStore struct { func (_m *SessionStore) AnalyticsSessionCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for AnalyticsSessionCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -47,10 +43,6 @@ func (_m *SessionStore) AnalyticsSessionCount() (int64, error) { func (_m *SessionStore) Cleanup(expiryTime int64, batchSize int64) error { ret := _m.Called(expiryTime, batchSize) - if len(ret) == 0 { - panic("no return value specified for Cleanup") - } - var r0 error if rf, ok := ret.Get(0).(func(int64, int64) error); ok { r0 = rf(expiryTime, batchSize) @@ -65,10 +57,6 @@ func (_m *SessionStore) Cleanup(expiryTime int64, batchSize int64) error { func (_m *SessionStore) Get(c request.CTX, sessionIDOrToken string) (*model.Session, error) { ret := _m.Called(c, sessionIDOrToken) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Session var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.Session, error)); ok { @@ -95,10 +83,6 @@ func (_m *SessionStore) Get(c request.CTX, sessionIDOrToken string) (*model.Sess func (_m *SessionStore) GetLRUSessions(c request.CTX, userID string, limit uint64, offset uint64) ([]*model.Session, error) { ret := _m.Called(c, userID, limit, offset) - if len(ret) == 0 { - panic("no return value specified for GetLRUSessions") - } - var r0 []*model.Session var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, uint64, uint64) ([]*model.Session, error)); ok { @@ -125,10 +109,6 @@ func (_m *SessionStore) GetLRUSessions(c request.CTX, userID string, limit uint6 func (_m *SessionStore) GetSessions(c request.CTX, userID string) ([]*model.Session, error) { ret := _m.Called(c, userID) - if len(ret) == 0 { - panic("no return value specified for GetSessions") - } - var r0 []*model.Session var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.Session, error)); ok { @@ -155,10 +135,6 @@ func (_m *SessionStore) GetSessions(c request.CTX, userID string) ([]*model.Sess func (_m *SessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly bool, unnotifiedOnly bool) ([]*model.Session, error) { ret := _m.Called(thresholdMillis, mobileOnly, unnotifiedOnly) - if len(ret) == 0 { - panic("no return value specified for GetSessionsExpired") - } - var r0 []*model.Session var r1 error if rf, ok := ret.Get(0).(func(int64, bool, bool) ([]*model.Session, error)); ok { @@ -185,10 +161,6 @@ func (_m *SessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly boo func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userID string) ([]*model.Session, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetSessionsWithActiveDeviceIds") - } - var r0 []*model.Session var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Session, error)); ok { @@ -215,10 +187,6 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userID string) ([]*model. func (_m *SessionStore) PermanentDeleteSessionsByUser(teamID string) error { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteSessionsByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(teamID) @@ -233,10 +201,6 @@ func (_m *SessionStore) PermanentDeleteSessionsByUser(teamID string) error { func (_m *SessionStore) Remove(sessionIDOrToken string) error { ret := _m.Called(sessionIDOrToken) - if len(ret) == 0 { - panic("no return value specified for Remove") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(sessionIDOrToken) @@ -251,10 +215,6 @@ func (_m *SessionStore) Remove(sessionIDOrToken string) error { func (_m *SessionStore) RemoveAllSessions() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for RemoveAllSessions") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -269,10 +229,6 @@ func (_m *SessionStore) RemoveAllSessions() error { func (_m *SessionStore) Save(c request.CTX, session *model.Session) (*model.Session, error) { ret := _m.Called(c, session) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Session var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Session) (*model.Session, error)); ok { @@ -299,10 +255,6 @@ func (_m *SessionStore) Save(c request.CTX, session *model.Session) (*model.Sess func (_m *SessionStore) UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error) { ret := _m.Called(id, deviceID, expiresAt) - if len(ret) == 0 { - panic("no return value specified for UpdateDeviceId") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string, int64) (string, error)); ok { @@ -327,10 +279,6 @@ func (_m *SessionStore) UpdateDeviceId(id string, deviceID string, expiresAt int func (_m *SessionStore) UpdateExpiredNotify(sessionid string, notified bool) error { ret := _m.Called(sessionid, notified) - if len(ret) == 0 { - panic("no return value specified for UpdateExpiredNotify") - } - var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(sessionid, notified) @@ -345,10 +293,6 @@ func (_m *SessionStore) UpdateExpiredNotify(sessionid string, notified bool) err func (_m *SessionStore) UpdateExpiresAt(sessionID string, timestamp int64) error { ret := _m.Called(sessionID, timestamp) - if len(ret) == 0 { - panic("no return value specified for UpdateExpiresAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(sessionID, timestamp) @@ -363,10 +307,6 @@ func (_m *SessionStore) UpdateExpiresAt(sessionID string, timestamp int64) error func (_m *SessionStore) UpdateLastActivityAt(sessionID string, timestamp int64) error { ret := _m.Called(sessionID, timestamp) - if len(ret) == 0 { - panic("no return value specified for UpdateLastActivityAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(sessionID, timestamp) @@ -381,10 +321,6 @@ func (_m *SessionStore) UpdateLastActivityAt(sessionID string, timestamp int64) func (_m *SessionStore) UpdateProps(session *model.Session) error { ret := _m.Called(session) - if len(ret) == 0 { - panic("no return value specified for UpdateProps") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Session) error); ok { r0 = rf(session) @@ -399,10 +335,6 @@ func (_m *SessionStore) UpdateProps(session *model.Session) error { func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error) { ret := _m.Called(userID, roles) - if len(ret) == 0 { - panic("no return value specified for UpdateRoles") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { @@ -423,12 +355,13 @@ func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error) return r0, r1 } -// NewSessionStore creates a new instance of SessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSessionStore(t interface { +type mockConstructorTestingTNewSessionStore interface { mock.TestingT Cleanup(func()) -}) *SessionStore { +} + +// NewSessionStore creates a new instance of SessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSessionStore(t mockConstructorTestingTNewSessionStore) *SessionStore { mock := &SessionStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/SharedChannelStore.go b/server/channels/store/storetest/mocks/SharedChannelStore.go index a867d5943f..ecfc3834fd 100644 --- a/server/channels/store/storetest/mocks/SharedChannelStore.go +++ b/server/channels/store/storetest/mocks/SharedChannelStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type SharedChannelStore struct { func (_m *SharedChannelStore) Delete(channelId string) (bool, error) { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -46,10 +42,6 @@ func (_m *SharedChannelStore) Delete(channelId string) (bool, error) { func (_m *SharedChannelStore) DeleteRemote(remoteId string) (bool, error) { ret := _m.Called(remoteId) - if len(ret) == 0 { - panic("no return value specified for DeleteRemote") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -74,10 +66,6 @@ func (_m *SharedChannelStore) DeleteRemote(remoteId string) (bool, error) { func (_m *SharedChannelStore) Get(channelId string) (*model.SharedChannel, error) { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(string) (*model.SharedChannel, error)); ok { @@ -104,10 +92,6 @@ func (_m *SharedChannelStore) Get(channelId string) (*model.SharedChannel, error func (_m *SharedChannelStore) GetAll(offset int, limit int, opts model.SharedChannelFilterOpts) ([]*model.SharedChannel, error) { ret := _m.Called(offset, limit, opts) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(int, int, model.SharedChannelFilterOpts) ([]*model.SharedChannel, error)); ok { @@ -134,10 +118,6 @@ func (_m *SharedChannelStore) GetAll(offset int, limit int, opts model.SharedCha func (_m *SharedChannelStore) GetAllCount(opts model.SharedChannelFilterOpts) (int64, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for GetAllCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(model.SharedChannelFilterOpts) (int64, error)); ok { @@ -162,10 +142,6 @@ func (_m *SharedChannelStore) GetAllCount(opts model.SharedChannelFilterOpts) (i func (_m *SharedChannelStore) GetAttachment(fileId string, remoteId string) (*model.SharedChannelAttachment, error) { ret := _m.Called(fileId, remoteId) - if len(ret) == 0 { - panic("no return value specified for GetAttachment") - } - var r0 *model.SharedChannelAttachment var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.SharedChannelAttachment, error)); ok { @@ -192,10 +168,6 @@ func (_m *SharedChannelStore) GetAttachment(fileId string, remoteId string) (*mo func (_m *SharedChannelStore) GetRemote(id string) (*model.SharedChannelRemote, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetRemote") - } - var r0 *model.SharedChannelRemote var r1 error if rf, ok := ret.Get(0).(func(string) (*model.SharedChannelRemote, error)); ok { @@ -222,10 +194,6 @@ func (_m *SharedChannelStore) GetRemote(id string) (*model.SharedChannelRemote, func (_m *SharedChannelStore) GetRemoteByIds(channelId string, remoteId string) (*model.SharedChannelRemote, error) { ret := _m.Called(channelId, remoteId) - if len(ret) == 0 { - panic("no return value specified for GetRemoteByIds") - } - var r0 *model.SharedChannelRemote var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.SharedChannelRemote, error)); ok { @@ -252,10 +220,6 @@ func (_m *SharedChannelStore) GetRemoteByIds(channelId string, remoteId string) func (_m *SharedChannelStore) GetRemoteForUser(remoteId string, userId string) (*model.RemoteCluster, error) { ret := _m.Called(remoteId, userId) - if len(ret) == 0 { - panic("no return value specified for GetRemoteForUser") - } - var r0 *model.RemoteCluster var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.RemoteCluster, error)); ok { @@ -282,10 +246,6 @@ func (_m *SharedChannelStore) GetRemoteForUser(remoteId string, userId string) ( func (_m *SharedChannelStore) GetRemotes(opts model.SharedChannelRemoteFilterOpts) ([]*model.SharedChannelRemote, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for GetRemotes") - } - var r0 []*model.SharedChannelRemote var r1 error if rf, ok := ret.Get(0).(func(model.SharedChannelRemoteFilterOpts) ([]*model.SharedChannelRemote, error)); ok { @@ -312,10 +272,6 @@ func (_m *SharedChannelStore) GetRemotes(opts model.SharedChannelRemoteFilterOpt func (_m *SharedChannelStore) GetRemotesStatus(channelId string) ([]*model.SharedChannelRemoteStatus, error) { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for GetRemotesStatus") - } - var r0 []*model.SharedChannelRemoteStatus var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.SharedChannelRemoteStatus, error)); ok { @@ -342,10 +298,6 @@ func (_m *SharedChannelStore) GetRemotesStatus(channelId string) ([]*model.Share func (_m *SharedChannelStore) GetSingleUser(userID string, channelID string, remoteID string) (*model.SharedChannelUser, error) { ret := _m.Called(userID, channelID, remoteID) - if len(ret) == 0 { - panic("no return value specified for GetSingleUser") - } - var r0 *model.SharedChannelUser var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (*model.SharedChannelUser, error)); ok { @@ -372,10 +324,6 @@ func (_m *SharedChannelStore) GetSingleUser(userID string, channelID string, rem func (_m *SharedChannelStore) GetUsersForSync(filter model.GetUsersForSyncFilter) ([]*model.User, error) { ret := _m.Called(filter) - if len(ret) == 0 { - panic("no return value specified for GetUsersForSync") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(model.GetUsersForSyncFilter) ([]*model.User, error)); ok { @@ -402,10 +350,6 @@ func (_m *SharedChannelStore) GetUsersForSync(filter model.GetUsersForSyncFilter func (_m *SharedChannelStore) GetUsersForUser(userID string) ([]*model.SharedChannelUser, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetUsersForUser") - } - var r0 []*model.SharedChannelUser var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.SharedChannelUser, error)); ok { @@ -432,10 +376,6 @@ func (_m *SharedChannelStore) GetUsersForUser(userID string) ([]*model.SharedCha func (_m *SharedChannelStore) HasChannel(channelID string) (bool, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for HasChannel") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -460,10 +400,6 @@ func (_m *SharedChannelStore) HasChannel(channelID string) (bool, error) { func (_m *SharedChannelStore) HasRemote(channelID string, remoteId string) (bool, error) { ret := _m.Called(channelID, remoteId) - if len(ret) == 0 { - panic("no return value specified for HasRemote") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -488,10 +424,6 @@ func (_m *SharedChannelStore) HasRemote(channelID string, remoteId string) (bool func (_m *SharedChannelStore) Save(sc *model.SharedChannel) (*model.SharedChannel, error) { ret := _m.Called(sc) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { @@ -518,10 +450,6 @@ func (_m *SharedChannelStore) Save(sc *model.SharedChannel) (*model.SharedChanne func (_m *SharedChannelStore) SaveAttachment(remote *model.SharedChannelAttachment) (*model.SharedChannelAttachment, error) { ret := _m.Called(remote) - if len(ret) == 0 { - panic("no return value specified for SaveAttachment") - } - var r0 *model.SharedChannelAttachment var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) (*model.SharedChannelAttachment, error)); ok { @@ -548,10 +476,6 @@ func (_m *SharedChannelStore) SaveAttachment(remote *model.SharedChannelAttachme func (_m *SharedChannelStore) SaveRemote(remote *model.SharedChannelRemote) (*model.SharedChannelRemote, error) { ret := _m.Called(remote) - if len(ret) == 0 { - panic("no return value specified for SaveRemote") - } - var r0 *model.SharedChannelRemote var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) (*model.SharedChannelRemote, error)); ok { @@ -578,10 +502,6 @@ func (_m *SharedChannelStore) SaveRemote(remote *model.SharedChannelRemote) (*mo func (_m *SharedChannelStore) SaveUser(remote *model.SharedChannelUser) (*model.SharedChannelUser, error) { ret := _m.Called(remote) - if len(ret) == 0 { - panic("no return value specified for SaveUser") - } - var r0 *model.SharedChannelUser var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannelUser) (*model.SharedChannelUser, error)); ok { @@ -608,10 +528,6 @@ func (_m *SharedChannelStore) SaveUser(remote *model.SharedChannelUser) (*model. func (_m *SharedChannelStore) Update(sc *model.SharedChannel) (*model.SharedChannel, error) { ret := _m.Called(sc) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { @@ -638,10 +554,6 @@ func (_m *SharedChannelStore) Update(sc *model.SharedChannel) (*model.SharedChan func (_m *SharedChannelStore) UpdateAttachmentLastSyncAt(id string, syncTime int64) error { ret := _m.Called(id, syncTime) - if len(ret) == 0 { - panic("no return value specified for UpdateAttachmentLastSyncAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(id, syncTime) @@ -656,10 +568,6 @@ func (_m *SharedChannelStore) UpdateAttachmentLastSyncAt(id string, syncTime int func (_m *SharedChannelStore) UpdateRemote(remote *model.SharedChannelRemote) (*model.SharedChannelRemote, error) { ret := _m.Called(remote) - if len(ret) == 0 { - panic("no return value specified for UpdateRemote") - } - var r0 *model.SharedChannelRemote var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) (*model.SharedChannelRemote, error)); ok { @@ -686,10 +594,6 @@ func (_m *SharedChannelStore) UpdateRemote(remote *model.SharedChannelRemote) (* func (_m *SharedChannelStore) UpdateRemoteCursor(id string, cursor model.GetPostsSinceForSyncCursor) error { ret := _m.Called(id, cursor) - if len(ret) == 0 { - panic("no return value specified for UpdateRemoteCursor") - } - var r0 error if rf, ok := ret.Get(0).(func(string, model.GetPostsSinceForSyncCursor) error); ok { r0 = rf(id, cursor) @@ -704,10 +608,6 @@ func (_m *SharedChannelStore) UpdateRemoteCursor(id string, cursor model.GetPost func (_m *SharedChannelStore) UpdateUserLastSyncAt(userID string, channelID string, remoteID string) error { ret := _m.Called(userID, channelID, remoteID) - if len(ret) == 0 { - panic("no return value specified for UpdateUserLastSyncAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(userID, channelID, remoteID) @@ -722,10 +622,6 @@ func (_m *SharedChannelStore) UpdateUserLastSyncAt(userID string, channelID stri func (_m *SharedChannelStore) UpsertAttachment(remote *model.SharedChannelAttachment) (string, error) { ret := _m.Called(remote) - if len(ret) == 0 { - panic("no return value specified for UpsertAttachment") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) (string, error)); ok { @@ -746,12 +642,13 @@ func (_m *SharedChannelStore) UpsertAttachment(remote *model.SharedChannelAttach return r0, r1 } -// NewSharedChannelStore creates a new instance of SharedChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSharedChannelStore(t interface { +type mockConstructorTestingTNewSharedChannelStore interface { mock.TestingT Cleanup(func()) -}) *SharedChannelStore { +} + +// NewSharedChannelStore creates a new instance of SharedChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSharedChannelStore(t mockConstructorTestingTNewSharedChannelStore) *SharedChannelStore { mock := &SharedChannelStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/StatusStore.go b/server/channels/store/storetest/mocks/StatusStore.go index 9c9dcfe663..d584221261 100644 --- a/server/channels/store/storetest/mocks/StatusStore.go +++ b/server/channels/store/storetest/mocks/StatusStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type StatusStore struct { func (_m *StatusStore) Get(userID string) (*model.Status, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Status var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Status, error)); ok { @@ -48,10 +44,6 @@ func (_m *StatusStore) Get(userID string) (*model.Status, error) { func (_m *StatusStore) GetByIds(userIds []string) ([]*model.Status, error) { ret := _m.Called(userIds) - if len(ret) == 0 { - panic("no return value specified for GetByIds") - } - var r0 []*model.Status var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Status, error)); ok { @@ -78,10 +70,6 @@ func (_m *StatusStore) GetByIds(userIds []string) ([]*model.Status, error) { func (_m *StatusStore) GetTotalActiveUsersCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetTotalActiveUsersCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -106,10 +94,6 @@ func (_m *StatusStore) GetTotalActiveUsersCount() (int64, error) { func (_m *StatusStore) ResetAll() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ResetAll") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -124,10 +108,6 @@ func (_m *StatusStore) ResetAll() error { func (_m *StatusStore) SaveOrUpdate(status *model.Status) error { ret := _m.Called(status) - if len(ret) == 0 { - panic("no return value specified for SaveOrUpdate") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Status) error); ok { r0 = rf(status) @@ -142,10 +122,6 @@ func (_m *StatusStore) SaveOrUpdate(status *model.Status) error { func (_m *StatusStore) UpdateExpiredDNDStatuses() ([]*model.Status, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for UpdateExpiredDNDStatuses") - } - var r0 []*model.Status var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Status, error)); ok { @@ -172,10 +148,6 @@ func (_m *StatusStore) UpdateExpiredDNDStatuses() ([]*model.Status, error) { func (_m *StatusStore) UpdateLastActivityAt(userID string, lastActivityAt int64) error { ret := _m.Called(userID, lastActivityAt) - if len(ret) == 0 { - panic("no return value specified for UpdateLastActivityAt") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(userID, lastActivityAt) @@ -186,12 +158,13 @@ func (_m *StatusStore) UpdateLastActivityAt(userID string, lastActivityAt int64) return r0 } -// NewStatusStore creates a new instance of StatusStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStatusStore(t interface { +type mockConstructorTestingTNewStatusStore interface { mock.TestingT Cleanup(func()) -}) *StatusStore { +} + +// NewStatusStore creates a new instance of StatusStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStatusStore(t mockConstructorTestingTNewStatusStore) *StatusStore { mock := &StatusStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/Store.go b/server/channels/store/storetest/mocks/Store.go index cbf8a6ba4f..e45356ae71 100644 --- a/server/channels/store/storetest/mocks/Store.go +++ b/server/channels/store/storetest/mocks/Store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -28,10 +28,6 @@ type Store struct { func (_m *Store) Audit() store.AuditStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Audit") - } - var r0 store.AuditStore if rf, ok := ret.Get(0).(func() store.AuditStore); ok { r0 = rf() @@ -48,10 +44,6 @@ func (_m *Store) Audit() store.AuditStore { func (_m *Store) Bot() store.BotStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Bot") - } - var r0 store.BotStore if rf, ok := ret.Get(0).(func() store.BotStore); ok { r0 = rf() @@ -68,10 +60,6 @@ func (_m *Store) Bot() store.BotStore { func (_m *Store) Channel() store.ChannelStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Channel") - } - var r0 store.ChannelStore if rf, ok := ret.Get(0).(func() store.ChannelStore); ok { r0 = rf() @@ -88,10 +76,6 @@ func (_m *Store) Channel() store.ChannelStore { func (_m *Store) ChannelBookmark() store.ChannelBookmarkStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ChannelBookmark") - } - var r0 store.ChannelBookmarkStore if rf, ok := ret.Get(0).(func() store.ChannelBookmarkStore); ok { r0 = rf() @@ -108,10 +92,6 @@ func (_m *Store) ChannelBookmark() store.ChannelBookmarkStore { func (_m *Store) ChannelMemberHistory() store.ChannelMemberHistoryStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ChannelMemberHistory") - } - var r0 store.ChannelMemberHistoryStore if rf, ok := ret.Get(0).(func() store.ChannelMemberHistoryStore); ok { r0 = rf() @@ -128,10 +108,6 @@ func (_m *Store) ChannelMemberHistory() store.ChannelMemberHistoryStore { func (_m *Store) CheckIntegrity() <-chan model.IntegrityCheckResult { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for CheckIntegrity") - } - var r0 <-chan model.IntegrityCheckResult if rf, ok := ret.Get(0).(func() <-chan model.IntegrityCheckResult); ok { r0 = rf() @@ -153,10 +129,6 @@ func (_m *Store) Close() { func (_m *Store) ClusterDiscovery() store.ClusterDiscoveryStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ClusterDiscovery") - } - var r0 store.ClusterDiscoveryStore if rf, ok := ret.Get(0).(func() store.ClusterDiscoveryStore); ok { r0 = rf() @@ -173,10 +145,6 @@ func (_m *Store) ClusterDiscovery() store.ClusterDiscoveryStore { func (_m *Store) Command() store.CommandStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Command") - } - var r0 store.CommandStore if rf, ok := ret.Get(0).(func() store.CommandStore); ok { r0 = rf() @@ -193,10 +161,6 @@ func (_m *Store) Command() store.CommandStore { func (_m *Store) CommandWebhook() store.CommandWebhookStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for CommandWebhook") - } - var r0 store.CommandWebhookStore if rf, ok := ret.Get(0).(func() store.CommandWebhookStore); ok { r0 = rf() @@ -213,10 +177,6 @@ func (_m *Store) CommandWebhook() store.CommandWebhookStore { func (_m *Store) Compliance() store.ComplianceStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Compliance") - } - var r0 store.ComplianceStore if rf, ok := ret.Get(0).(func() store.ComplianceStore); ok { r0 = rf() @@ -233,10 +193,6 @@ func (_m *Store) Compliance() store.ComplianceStore { func (_m *Store) Context() context.Context { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Context") - } - var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -253,10 +209,6 @@ func (_m *Store) Context() context.Context { func (_m *Store) DesktopTokens() store.DesktopTokensStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for DesktopTokens") - } - var r0 store.DesktopTokensStore if rf, ok := ret.Get(0).(func() store.DesktopTokensStore); ok { r0 = rf() @@ -273,10 +225,6 @@ func (_m *Store) DesktopTokens() store.DesktopTokensStore { func (_m *Store) Draft() store.DraftStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Draft") - } - var r0 store.DraftStore if rf, ok := ret.Get(0).(func() store.DraftStore); ok { r0 = rf() @@ -298,10 +246,6 @@ func (_m *Store) DropAllTables() { func (_m *Store) Emoji() store.EmojiStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Emoji") - } - var r0 store.EmojiStore if rf, ok := ret.Get(0).(func() store.EmojiStore); ok { r0 = rf() @@ -318,10 +262,6 @@ func (_m *Store) Emoji() store.EmojiStore { func (_m *Store) FileInfo() store.FileInfoStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for FileInfo") - } - var r0 store.FileInfoStore if rf, ok := ret.Get(0).(func() store.FileInfoStore); ok { r0 = rf() @@ -338,10 +278,6 @@ func (_m *Store) FileInfo() store.FileInfoStore { func (_m *Store) GetAppliedMigrations() ([]model.AppliedMigration, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAppliedMigrations") - } - var r0 []model.AppliedMigration var r1 error if rf, ok := ret.Get(0).(func() ([]model.AppliedMigration, error)); ok { @@ -368,10 +304,6 @@ func (_m *Store) GetAppliedMigrations() ([]model.AppliedMigration, error) { func (_m *Store) GetDBSchemaVersion() (int, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetDBSchemaVersion") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func() (int, error)); ok { @@ -396,10 +328,6 @@ func (_m *Store) GetDBSchemaVersion() (int, error) { func (_m *Store) GetDbVersion(numerical bool) (string, error) { ret := _m.Called(numerical) - if len(ret) == 0 { - panic("no return value specified for GetDbVersion") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(bool) (string, error)); ok { @@ -424,10 +352,6 @@ func (_m *Store) GetDbVersion(numerical bool) (string, error) { func (_m *Store) GetInternalMasterDB() *sql.DB { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetInternalMasterDB") - } - var r0 *sql.DB if rf, ok := ret.Get(0).(func() *sql.DB); ok { r0 = rf() @@ -444,10 +368,6 @@ func (_m *Store) GetInternalMasterDB() *sql.DB { func (_m *Store) GetInternalReplicaDB() *sql.DB { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetInternalReplicaDB") - } - var r0 *sql.DB if rf, ok := ret.Get(0).(func() *sql.DB); ok { r0 = rf() @@ -464,10 +384,6 @@ func (_m *Store) GetInternalReplicaDB() *sql.DB { func (_m *Store) GetLocalSchemaVersion() (int, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetLocalSchemaVersion") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func() (int, error)); ok { @@ -492,10 +408,6 @@ func (_m *Store) GetLocalSchemaVersion() (int, error) { func (_m *Store) Group() store.GroupStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Group") - } - var r0 store.GroupStore if rf, ok := ret.Get(0).(func() store.GroupStore); ok { r0 = rf() @@ -512,10 +424,6 @@ func (_m *Store) Group() store.GroupStore { func (_m *Store) Job() store.JobStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Job") - } - var r0 store.JobStore if rf, ok := ret.Get(0).(func() store.JobStore); ok { r0 = rf() @@ -532,10 +440,6 @@ func (_m *Store) Job() store.JobStore { func (_m *Store) License() store.LicenseStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for License") - } - var r0 store.LicenseStore if rf, ok := ret.Get(0).(func() store.LicenseStore); ok { r0 = rf() @@ -552,10 +456,6 @@ func (_m *Store) License() store.LicenseStore { func (_m *Store) LinkMetadata() store.LinkMetadataStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for LinkMetadata") - } - var r0 store.LinkMetadataStore if rf, ok := ret.Get(0).(func() store.LinkMetadataStore); ok { r0 = rf() @@ -577,10 +477,6 @@ func (_m *Store) LockToMaster() { func (_m *Store) Logger() mlog.LoggerIFace { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Logger") - } - var r0 mlog.LoggerIFace if rf, ok := ret.Get(0).(func() mlog.LoggerIFace); ok { r0 = rf() @@ -602,10 +498,6 @@ func (_m *Store) MarkSystemRanUnitTests() { func (_m *Store) NotifyAdmin() store.NotifyAdminStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for NotifyAdmin") - } - var r0 store.NotifyAdminStore if rf, ok := ret.Get(0).(func() store.NotifyAdminStore); ok { r0 = rf() @@ -622,10 +514,6 @@ func (_m *Store) NotifyAdmin() store.NotifyAdminStore { func (_m *Store) OAuth() store.OAuthStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for OAuth") - } - var r0 store.OAuthStore if rf, ok := ret.Get(0).(func() store.OAuthStore); ok { r0 = rf() @@ -642,10 +530,6 @@ func (_m *Store) OAuth() store.OAuthStore { func (_m *Store) OutgoingOAuthConnection() store.OutgoingOAuthConnectionStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for OutgoingOAuthConnection") - } - var r0 store.OutgoingOAuthConnectionStore if rf, ok := ret.Get(0).(func() store.OutgoingOAuthConnectionStore); ok { r0 = rf() @@ -662,10 +546,6 @@ func (_m *Store) OutgoingOAuthConnection() store.OutgoingOAuthConnectionStore { func (_m *Store) Plugin() store.PluginStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Plugin") - } - var r0 store.PluginStore if rf, ok := ret.Get(0).(func() store.PluginStore); ok { r0 = rf() @@ -682,10 +562,6 @@ func (_m *Store) Plugin() store.PluginStore { func (_m *Store) Post() store.PostStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Post") - } - var r0 store.PostStore if rf, ok := ret.Get(0).(func() store.PostStore); ok { r0 = rf() @@ -702,10 +578,6 @@ func (_m *Store) Post() store.PostStore { func (_m *Store) PostAcknowledgement() store.PostAcknowledgementStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for PostAcknowledgement") - } - var r0 store.PostAcknowledgementStore if rf, ok := ret.Get(0).(func() store.PostAcknowledgementStore); ok { r0 = rf() @@ -722,10 +594,6 @@ func (_m *Store) PostAcknowledgement() store.PostAcknowledgementStore { func (_m *Store) PostPersistentNotification() store.PostPersistentNotificationStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for PostPersistentNotification") - } - var r0 store.PostPersistentNotificationStore if rf, ok := ret.Get(0).(func() store.PostPersistentNotificationStore); ok { r0 = rf() @@ -742,10 +610,6 @@ func (_m *Store) PostPersistentNotification() store.PostPersistentNotificationSt func (_m *Store) PostPriority() store.PostPriorityStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for PostPriority") - } - var r0 store.PostPriorityStore if rf, ok := ret.Get(0).(func() store.PostPriorityStore); ok { r0 = rf() @@ -762,10 +626,6 @@ func (_m *Store) PostPriority() store.PostPriorityStore { func (_m *Store) Preference() store.PreferenceStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Preference") - } - var r0 store.PreferenceStore if rf, ok := ret.Get(0).(func() store.PreferenceStore); ok { r0 = rf() @@ -782,10 +642,6 @@ func (_m *Store) Preference() store.PreferenceStore { func (_m *Store) ProductNotices() store.ProductNoticesStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ProductNotices") - } - var r0 store.ProductNoticesStore if rf, ok := ret.Get(0).(func() store.ProductNoticesStore); ok { r0 = rf() @@ -802,10 +658,6 @@ func (_m *Store) ProductNotices() store.ProductNoticesStore { func (_m *Store) Reaction() store.ReactionStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Reaction") - } - var r0 store.ReactionStore if rf, ok := ret.Get(0).(func() store.ReactionStore); ok { r0 = rf() @@ -827,10 +679,6 @@ func (_m *Store) RecycleDBConnections(d time.Duration) { func (_m *Store) RemoteCluster() store.RemoteClusterStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for RemoteCluster") - } - var r0 store.RemoteClusterStore if rf, ok := ret.Get(0).(func() store.RemoteClusterStore); ok { r0 = rf() @@ -847,10 +695,6 @@ func (_m *Store) RemoteCluster() store.RemoteClusterStore { func (_m *Store) ReplicaLagAbs() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ReplicaLagAbs") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -865,10 +709,6 @@ func (_m *Store) ReplicaLagAbs() error { func (_m *Store) ReplicaLagTime() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ReplicaLagTime") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -883,10 +723,6 @@ func (_m *Store) ReplicaLagTime() error { func (_m *Store) RetentionPolicy() store.RetentionPolicyStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for RetentionPolicy") - } - var r0 store.RetentionPolicyStore if rf, ok := ret.Get(0).(func() store.RetentionPolicyStore); ok { r0 = rf() @@ -903,10 +739,6 @@ func (_m *Store) RetentionPolicy() store.RetentionPolicyStore { func (_m *Store) Role() store.RoleStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Role") - } - var r0 store.RoleStore if rf, ok := ret.Get(0).(func() store.RoleStore); ok { r0 = rf() @@ -923,10 +755,6 @@ func (_m *Store) Role() store.RoleStore { func (_m *Store) Scheme() store.SchemeStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Scheme") - } - var r0 store.SchemeStore if rf, ok := ret.Get(0).(func() store.SchemeStore); ok { r0 = rf() @@ -943,10 +771,6 @@ func (_m *Store) Scheme() store.SchemeStore { func (_m *Store) Session() store.SessionStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Session") - } - var r0 store.SessionStore if rf, ok := ret.Get(0).(func() store.SessionStore); ok { r0 = rf() @@ -968,10 +792,6 @@ func (_m *Store) SetContext(_a0 context.Context) { func (_m *Store) SharedChannel() store.SharedChannelStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for SharedChannel") - } - var r0 store.SharedChannelStore if rf, ok := ret.Get(0).(func() store.SharedChannelStore); ok { r0 = rf() @@ -988,10 +808,6 @@ func (_m *Store) SharedChannel() store.SharedChannelStore { func (_m *Store) Status() store.StatusStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Status") - } - var r0 store.StatusStore if rf, ok := ret.Get(0).(func() store.StatusStore); ok { r0 = rf() @@ -1008,10 +824,6 @@ func (_m *Store) Status() store.StatusStore { func (_m *Store) System() store.SystemStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for System") - } - var r0 store.SystemStore if rf, ok := ret.Get(0).(func() store.SystemStore); ok { r0 = rf() @@ -1028,10 +840,6 @@ func (_m *Store) System() store.SystemStore { func (_m *Store) Team() store.TeamStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Team") - } - var r0 store.TeamStore if rf, ok := ret.Get(0).(func() store.TeamStore); ok { r0 = rf() @@ -1048,10 +856,6 @@ func (_m *Store) Team() store.TeamStore { func (_m *Store) TermsOfService() store.TermsOfServiceStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TermsOfService") - } - var r0 store.TermsOfServiceStore if rf, ok := ret.Get(0).(func() store.TermsOfServiceStore); ok { r0 = rf() @@ -1068,10 +872,6 @@ func (_m *Store) TermsOfService() store.TermsOfServiceStore { func (_m *Store) Thread() store.ThreadStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Thread") - } - var r0 store.ThreadStore if rf, ok := ret.Get(0).(func() store.ThreadStore); ok { r0 = rf() @@ -1088,10 +888,6 @@ func (_m *Store) Thread() store.ThreadStore { func (_m *Store) Token() store.TokenStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Token") - } - var r0 store.TokenStore if rf, ok := ret.Get(0).(func() store.TokenStore); ok { r0 = rf() @@ -1108,10 +904,6 @@ func (_m *Store) Token() store.TokenStore { func (_m *Store) TotalMasterDbConnections() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TotalMasterDbConnections") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -1126,10 +918,6 @@ func (_m *Store) TotalMasterDbConnections() int { func (_m *Store) TotalReadDbConnections() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TotalReadDbConnections") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -1144,10 +932,6 @@ func (_m *Store) TotalReadDbConnections() int { func (_m *Store) TotalSearchDbConnections() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TotalSearchDbConnections") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -1162,10 +946,6 @@ func (_m *Store) TotalSearchDbConnections() int { func (_m *Store) TrueUpReview() store.TrueUpReviewStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TrueUpReview") - } - var r0 store.TrueUpReviewStore if rf, ok := ret.Get(0).(func() store.TrueUpReviewStore); ok { r0 = rf() @@ -1187,10 +967,6 @@ func (_m *Store) UnlockFromMaster() { func (_m *Store) UploadSession() store.UploadSessionStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for UploadSession") - } - var r0 store.UploadSessionStore if rf, ok := ret.Get(0).(func() store.UploadSessionStore); ok { r0 = rf() @@ -1207,10 +983,6 @@ func (_m *Store) UploadSession() store.UploadSessionStore { func (_m *Store) User() store.UserStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for User") - } - var r0 store.UserStore if rf, ok := ret.Get(0).(func() store.UserStore); ok { r0 = rf() @@ -1227,10 +999,6 @@ func (_m *Store) User() store.UserStore { func (_m *Store) UserAccessToken() store.UserAccessTokenStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for UserAccessToken") - } - var r0 store.UserAccessTokenStore if rf, ok := ret.Get(0).(func() store.UserAccessTokenStore); ok { r0 = rf() @@ -1247,10 +1015,6 @@ func (_m *Store) UserAccessToken() store.UserAccessTokenStore { func (_m *Store) UserTermsOfService() store.UserTermsOfServiceStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for UserTermsOfService") - } - var r0 store.UserTermsOfServiceStore if rf, ok := ret.Get(0).(func() store.UserTermsOfServiceStore); ok { r0 = rf() @@ -1267,10 +1031,6 @@ func (_m *Store) UserTermsOfService() store.UserTermsOfServiceStore { func (_m *Store) Webhook() store.WebhookStore { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Webhook") - } - var r0 store.WebhookStore if rf, ok := ret.Get(0).(func() store.WebhookStore); ok { r0 = rf() @@ -1283,12 +1043,13 @@ func (_m *Store) Webhook() store.WebhookStore { return r0 } -// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStore(t interface { +type mockConstructorTestingTNewStore interface { mock.TestingT Cleanup(func()) -}) *Store { +} + +// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStore(t mockConstructorTestingTNewStore) *Store { mock := &Store{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/SystemStore.go b/server/channels/store/storetest/mocks/SystemStore.go index 0ce7874c2b..38dd182e82 100644 --- a/server/channels/store/storetest/mocks/SystemStore.go +++ b/server/channels/store/storetest/mocks/SystemStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type SystemStore struct { func (_m *SystemStore) Get() (model.StringMap, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 model.StringMap var r1 error if rf, ok := ret.Get(0).(func() (model.StringMap, error)); ok { @@ -48,10 +44,6 @@ func (_m *SystemStore) Get() (model.StringMap, error) { func (_m *SystemStore) GetByName(name string) (*model.System, error) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.System var r1 error if rf, ok := ret.Get(0).(func(string) (*model.System, error)); ok { @@ -78,10 +70,6 @@ func (_m *SystemStore) GetByName(name string) (*model.System, error) { func (_m *SystemStore) InsertIfExists(system *model.System) (*model.System, error) { ret := _m.Called(system) - if len(ret) == 0 { - panic("no return value specified for InsertIfExists") - } - var r0 *model.System var r1 error if rf, ok := ret.Get(0).(func(*model.System) (*model.System, error)); ok { @@ -108,10 +96,6 @@ func (_m *SystemStore) InsertIfExists(system *model.System) (*model.System, erro func (_m *SystemStore) PermanentDeleteByName(name string) (*model.System, error) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByName") - } - var r0 *model.System var r1 error if rf, ok := ret.Get(0).(func(string) (*model.System, error)); ok { @@ -138,10 +122,6 @@ func (_m *SystemStore) PermanentDeleteByName(name string) (*model.System, error) func (_m *SystemStore) Save(system *model.System) error { ret := _m.Called(system) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.System) error); ok { r0 = rf(system) @@ -156,10 +136,6 @@ func (_m *SystemStore) Save(system *model.System) error { func (_m *SystemStore) SaveOrUpdate(system *model.System) error { ret := _m.Called(system) - if len(ret) == 0 { - panic("no return value specified for SaveOrUpdate") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.System) error); ok { r0 = rf(system) @@ -174,10 +150,6 @@ func (_m *SystemStore) SaveOrUpdate(system *model.System) error { func (_m *SystemStore) Update(system *model.System) error { ret := _m.Called(system) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.System) error); ok { r0 = rf(system) @@ -188,12 +160,13 @@ func (_m *SystemStore) Update(system *model.System) error { return r0 } -// NewSystemStore creates a new instance of SystemStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSystemStore(t interface { +type mockConstructorTestingTNewSystemStore interface { mock.TestingT Cleanup(func()) -}) *SystemStore { +} + +// NewSystemStore creates a new instance of SystemStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSystemStore(t mockConstructorTestingTNewSystemStore) *SystemStore { mock := &SystemStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/TeamStore.go b/server/channels/store/storetest/mocks/TeamStore.go index 2c23ba3077..1fd55f01ab 100644 --- a/server/channels/store/storetest/mocks/TeamStore.go +++ b/server/channels/store/storetest/mocks/TeamStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type TeamStore struct { func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeID string) (int64, error) { ret := _m.Called(schemeID) - if len(ret) == 0 { - panic("no return value specified for AnalyticsGetTeamCountForScheme") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -47,10 +43,6 @@ func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeID string) (int64, err func (_m *TeamStore) AnalyticsTeamCount(opts *model.TeamSearch) (int64, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for AnalyticsTeamCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*model.TeamSearch) (int64, error)); ok { @@ -75,10 +67,6 @@ func (_m *TeamStore) AnalyticsTeamCount(opts *model.TeamSearch) (int64, error) { func (_m *TeamStore) ClearAllCustomRoleAssignments() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ClearAllCustomRoleAssignments") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -98,10 +86,6 @@ func (_m *TeamStore) ClearCaches() { func (_m *TeamStore) Get(id string) (*model.Team, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok { @@ -128,10 +112,6 @@ func (_m *TeamStore) Get(id string) (*model.Team, error) { func (_m *TeamStore) GetActiveMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) { ret := _m.Called(teamID, restrictions) - if len(ret) == 0 { - panic("no return value specified for GetActiveMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok { @@ -156,10 +136,6 @@ func (_m *TeamStore) GetActiveMemberCount(teamID string, restrictions *model.Vie func (_m *TeamStore) GetAll() ([]*model.Team, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok { @@ -186,10 +162,6 @@ func (_m *TeamStore) GetAll() ([]*model.Team, error) { func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.TeamForExport, error) { ret := _m.Called(limit, afterID) - if len(ret) == 0 { - panic("no return value specified for GetAllForExportAfter") - } - var r0 []*model.TeamForExport var r1 error if rf, ok := ret.Get(0).(func(int, string) ([]*model.TeamForExport, error)); ok { @@ -216,10 +188,6 @@ func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.T func (_m *TeamStore) GetAllPage(offset int, limit int, opts *model.TeamSearch) ([]*model.Team, error) { ret := _m.Called(offset, limit, opts) - if len(ret) == 0 { - panic("no return value specified for GetAllPage") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(int, int, *model.TeamSearch) ([]*model.Team, error)); ok { @@ -246,10 +214,6 @@ func (_m *TeamStore) GetAllPage(offset int, limit int, opts *model.TeamSearch) ( func (_m *TeamStore) GetAllPrivateTeamListing() ([]*model.Team, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAllPrivateTeamListing") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok { @@ -276,10 +240,6 @@ func (_m *TeamStore) GetAllPrivateTeamListing() ([]*model.Team, error) { func (_m *TeamStore) GetAllTeamListing() ([]*model.Team, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAllTeamListing") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok { @@ -306,10 +266,6 @@ func (_m *TeamStore) GetAllTeamListing() ([]*model.Team, error) { func (_m *TeamStore) GetByEmptyInviteID() ([]*model.Team, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetByEmptyInviteID") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok { @@ -336,10 +292,6 @@ func (_m *TeamStore) GetByEmptyInviteID() ([]*model.Team, error) { func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) { ret := _m.Called(inviteID) - if len(ret) == 0 { - panic("no return value specified for GetByInviteId") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok { @@ -366,10 +318,6 @@ func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) { func (_m *TeamStore) GetByName(name string) (*model.Team, error) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok { @@ -396,10 +344,6 @@ func (_m *TeamStore) GetByName(name string) (*model.Team, error) { func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetByNames") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Team, error)); ok { @@ -426,10 +370,6 @@ func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) { func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userID string) ([]*model.ChannelUnread, error) { ret := _m.Called(excludeTeamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelUnreadsForAllTeams") - } - var r0 []*model.ChannelUnread var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.ChannelUnread, error)); ok { @@ -456,10 +396,6 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userID s func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userID string) ([]*model.ChannelUnread, error) { ret := _m.Called(teamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelUnreadsForTeam") - } - var r0 []*model.ChannelUnread var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.ChannelUnread, error)); ok { @@ -486,10 +422,6 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userID string) ([]* func (_m *TeamStore) GetCommonTeamIDsForMultipleUsers(userIDs []string) ([]string, error) { ret := _m.Called(userIDs) - if len(ret) == 0 { - panic("no return value specified for GetCommonTeamIDsForMultipleUsers") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func([]string) ([]string, error)); ok { @@ -516,10 +448,6 @@ func (_m *TeamStore) GetCommonTeamIDsForMultipleUsers(userIDs []string) ([]strin func (_m *TeamStore) GetCommonTeamIDsForTwoUsers(userID string, otherUserID string) ([]string, error) { ret := _m.Called(userID, otherUserID) - if len(ret) == 0 { - panic("no return value specified for GetCommonTeamIDsForTwoUsers") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok { @@ -546,10 +474,6 @@ func (_m *TeamStore) GetCommonTeamIDsForTwoUsers(userID string, otherUserID stri func (_m *TeamStore) GetMany(ids []string) ([]*model.Team, error) { ret := _m.Called(ids) - if len(ret) == 0 { - panic("no return value specified for GetMany") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.Team, error)); ok { @@ -576,10 +500,6 @@ func (_m *TeamStore) GetMany(ids []string) ([]*model.Team, error) { func (_m *TeamStore) GetMember(c request.CTX, teamID string, userID string) (*model.TeamMember, error) { ret := _m.Called(c, teamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetMember") - } - var r0 *model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.TeamMember, error)); ok { @@ -606,10 +526,6 @@ func (_m *TeamStore) GetMember(c request.CTX, teamID string, userID string) (*mo func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) { ret := _m.Called(teamID, offset, limit, teamMembersGetOptions) - if len(ret) == 0 { - panic("no return value specified for GetMembers") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) ([]*model.TeamMember, error)); ok { @@ -636,10 +552,6 @@ func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMember func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) { ret := _m.Called(teamID, userIds, restrictions) - if len(ret) == 0 { - panic("no return value specified for GetMembersByIds") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) ([]*model.TeamMember, error)); ok { @@ -666,10 +578,6 @@ func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictio func (_m *TeamStore) GetTeamMembersForExport(userID string) ([]*model.TeamMemberForExport, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamMembersForExport") - } - var r0 []*model.TeamMemberForExport var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.TeamMemberForExport, error)); ok { @@ -696,10 +604,6 @@ func (_m *TeamStore) GetTeamMembersForExport(userID string) ([]*model.TeamMember func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([]*model.Team, error) { ret := _m.Called(schemeID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetTeamsByScheme") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Team, error)); ok { @@ -726,10 +630,6 @@ func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([ func (_m *TeamStore) GetTeamsByUserId(userID string) ([]*model.Team, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamsByUserId") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Team, error)); ok { @@ -756,10 +656,6 @@ func (_m *TeamStore) GetTeamsByUserId(userID string) ([]*model.Team, error) { func (_m *TeamStore) GetTeamsForUser(c request.CTX, userID string, excludeTeamID string, includeDeleted bool) ([]*model.TeamMember, error) { ret := _m.Called(c, userID, excludeTeamID, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetTeamsForUser") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, bool) ([]*model.TeamMember, error)); ok { @@ -786,10 +682,6 @@ func (_m *TeamStore) GetTeamsForUser(c request.CTX, userID string, excludeTeamID func (_m *TeamStore) GetTeamsForUserWithPagination(userID string, page int, perPage int) ([]*model.TeamMember, error) { ret := _m.Called(userID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetTeamsForUserWithPagination") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, error)); ok { @@ -816,10 +708,6 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userID string, page int, perP func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) { ret := _m.Called(teamID, restrictions) - if len(ret) == 0 { - panic("no return value specified for GetTotalMemberCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok { @@ -844,10 +732,6 @@ func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.View func (_m *TeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]string, error) { ret := _m.Called(userID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetUserTeamIds") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { @@ -874,10 +758,6 @@ func (_m *TeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]strin func (_m *TeamStore) GroupSyncedTeamCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GroupSyncedTeamCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -907,10 +787,6 @@ func (_m *TeamStore) InvalidateAllTeamIdsForUser(userID string) { func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserID string) (map[string]string, error) { ret := _m.Called(fromTeamID, fromUserID) - if len(ret) == 0 { - panic("no return value specified for MigrateTeamMembers") - } - var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func(string, string) (map[string]string, error)); ok { @@ -937,10 +813,6 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserID string) (m func (_m *TeamStore) PermanentDelete(teamID string) error { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(teamID) @@ -955,10 +827,6 @@ func (_m *TeamStore) PermanentDelete(teamID string) error { func (_m *TeamStore) RemoveAllMembersByTeam(teamID string) error { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for RemoveAllMembersByTeam") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(teamID) @@ -973,10 +841,6 @@ func (_m *TeamStore) RemoveAllMembersByTeam(teamID string) error { func (_m *TeamStore) RemoveAllMembersByUser(ctx request.CTX, userID string) error { ret := _m.Called(ctx, userID) - if len(ret) == 0 { - panic("no return value specified for RemoveAllMembersByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(ctx, userID) @@ -991,10 +855,6 @@ func (_m *TeamStore) RemoveAllMembersByUser(ctx request.CTX, userID string) erro func (_m *TeamStore) RemoveMember(rctx request.CTX, teamID string, userID string) error { ret := _m.Called(rctx, teamID, userID) - if len(ret) == 0 { - panic("no return value specified for RemoveMember") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, string) error); ok { r0 = rf(rctx, teamID, userID) @@ -1009,10 +869,6 @@ func (_m *TeamStore) RemoveMember(rctx request.CTX, teamID string, userID string func (_m *TeamStore) RemoveMembers(rctx request.CTX, teamID string, userIds []string) error { ret := _m.Called(rctx, teamID, userIds) - if len(ret) == 0 { - panic("no return value specified for RemoveMembers") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string, []string) error); ok { r0 = rf(rctx, teamID, userIds) @@ -1027,10 +883,6 @@ func (_m *TeamStore) RemoveMembers(rctx request.CTX, teamID string, userIds []st func (_m *TeamStore) ResetAllTeamSchemes() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ResetAllTeamSchemes") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1045,10 +897,6 @@ func (_m *TeamStore) ResetAllTeamSchemes() error { func (_m *TeamStore) Save(team *model.Team) (*model.Team, error) { ret := _m.Called(team) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, error)); ok { @@ -1075,10 +923,6 @@ func (_m *TeamStore) Save(team *model.Team) (*model.Team, error) { func (_m *TeamStore) SaveMember(rctx request.CTX, member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, error) { ret := _m.Called(rctx, member, maxUsersPerTeam) - if len(ret) == 0 { - panic("no return value specified for SaveMember") - } - var r0 *model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.TeamMember, int) (*model.TeamMember, error)); ok { @@ -1105,10 +949,6 @@ func (_m *TeamStore) SaveMember(rctx request.CTX, member *model.TeamMember, maxU func (_m *TeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPerTeam int) ([]*model.TeamMember, error) { ret := _m.Called(members, maxUsersPerTeam) - if len(ret) == 0 { - panic("no return value specified for SaveMultipleMembers") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func([]*model.TeamMember, int) ([]*model.TeamMember, error)); ok { @@ -1135,10 +975,6 @@ func (_m *TeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPe func (_m *TeamStore) SearchAll(opts *model.TeamSearch) ([]*model.Team, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for SearchAll") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok { @@ -1165,10 +1001,6 @@ func (_m *TeamStore) SearchAll(opts *model.TeamSearch) ([]*model.Team, error) { func (_m *TeamStore) SearchAllPaged(opts *model.TeamSearch) ([]*model.Team, int64, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for SearchAllPaged") - } - var r0 []*model.Team var r1 int64 var r2 error @@ -1202,10 +1034,6 @@ func (_m *TeamStore) SearchAllPaged(opts *model.TeamSearch) ([]*model.Team, int6 func (_m *TeamStore) SearchOpen(opts *model.TeamSearch) ([]*model.Team, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for SearchOpen") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok { @@ -1232,10 +1060,6 @@ func (_m *TeamStore) SearchOpen(opts *model.TeamSearch) ([]*model.Team, error) { func (_m *TeamStore) SearchPrivate(opts *model.TeamSearch) ([]*model.Team, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for SearchPrivate") - } - var r0 []*model.Team var r1 error if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok { @@ -1262,10 +1086,6 @@ func (_m *TeamStore) SearchPrivate(opts *model.TeamSearch) ([]*model.Team, error func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) { ret := _m.Called(team) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.Team var r1 error if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, error)); ok { @@ -1292,10 +1112,6 @@ func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) { func (_m *TeamStore) UpdateLastTeamIconUpdate(teamID string, curTime int64) error { ret := _m.Called(teamID, curTime) - if len(ret) == 0 { - panic("no return value specified for UpdateLastTeamIconUpdate") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(teamID, curTime) @@ -1310,10 +1126,6 @@ func (_m *TeamStore) UpdateLastTeamIconUpdate(teamID string, curTime int64) erro func (_m *TeamStore) UpdateMember(rctx request.CTX, member *model.TeamMember) (*model.TeamMember, error) { ret := _m.Called(rctx, member) - if len(ret) == 0 { - panic("no return value specified for UpdateMember") - } - var r0 *model.TeamMember var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.TeamMember) (*model.TeamMember, error)); ok { @@ -1340,10 +1152,6 @@ func (_m *TeamStore) UpdateMember(rctx request.CTX, member *model.TeamMember) (* func (_m *TeamStore) UpdateMembersRole(teamID string, userIDs []string) error { ret := _m.Called(teamID, userIDs) - if len(ret) == 0 { - panic("no return value specified for UpdateMembersRole") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(teamID, userIDs) @@ -1358,10 +1166,6 @@ func (_m *TeamStore) UpdateMembersRole(teamID string, userIDs []string) error { func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*model.TeamMember, error) { ret := _m.Called(members) - if len(ret) == 0 { - panic("no return value specified for UpdateMultipleMembers") - } - var r0 []*model.TeamMember var r1 error if rf, ok := ret.Get(0).(func([]*model.TeamMember) ([]*model.TeamMember, error)); ok { @@ -1388,10 +1192,6 @@ func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*mode func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool, error) { ret := _m.Called(userID, teamIds) - if len(ret) == 0 { - panic("no return value specified for UserBelongsToTeams") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, []string) (bool, error)); ok { @@ -1412,12 +1212,13 @@ func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool, return r0, r1 } -// NewTeamStore creates a new instance of TeamStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTeamStore(t interface { +type mockConstructorTestingTNewTeamStore interface { mock.TestingT Cleanup(func()) -}) *TeamStore { +} + +// NewTeamStore creates a new instance of TeamStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTeamStore(t mockConstructorTestingTNewTeamStore) *TeamStore { mock := &TeamStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/TermsOfServiceStore.go b/server/channels/store/storetest/mocks/TermsOfServiceStore.go index 5e66c9e607..ce810e2efd 100644 --- a/server/channels/store/storetest/mocks/TermsOfServiceStore.go +++ b/server/channels/store/storetest/mocks/TermsOfServiceStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type TermsOfServiceStore struct { func (_m *TermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, error) { ret := _m.Called(id, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.TermsOfService var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.TermsOfService, error)); ok { @@ -48,10 +44,6 @@ func (_m *TermsOfServiceStore) Get(id string, allowFromCache bool) (*model.Terms func (_m *TermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, error) { ret := _m.Called(allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetLatest") - } - var r0 *model.TermsOfService var r1 error if rf, ok := ret.Get(0).(func(bool) (*model.TermsOfService, error)); ok { @@ -78,10 +70,6 @@ func (_m *TermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfSer func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, error) { ret := _m.Called(termsOfService) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.TermsOfService var r1 error if rf, ok := ret.Get(0).(func(*model.TermsOfService) (*model.TermsOfService, error)); ok { @@ -104,12 +92,13 @@ func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*mode return r0, r1 } -// NewTermsOfServiceStore creates a new instance of TermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTermsOfServiceStore(t interface { +type mockConstructorTestingTNewTermsOfServiceStore interface { mock.TestingT Cleanup(func()) -}) *TermsOfServiceStore { +} + +// NewTermsOfServiceStore creates a new instance of TermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTermsOfServiceStore(t mockConstructorTestingTNewTermsOfServiceStore) *TermsOfServiceStore { mock := &TermsOfServiceStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/ThreadStore.go b/server/channels/store/storetest/mocks/ThreadStore.go index b8fbd477ac..54b0d092e3 100644 --- a/server/channels/store/storetest/mocks/ThreadStore.go +++ b/server/channels/store/storetest/mocks/ThreadStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type ThreadStore struct { func (_m *ThreadStore) DeleteMembershipForUser(userId string, postID string) error { ret := _m.Called(userId, postID) - if len(ret) == 0 { - panic("no return value specified for DeleteMembershipForUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userId, postID) @@ -37,10 +33,6 @@ func (_m *ThreadStore) DeleteMembershipForUser(userId string, postID string) err func (_m *ThreadStore) DeleteMembershipsForChannel(userID string, channelID string) error { ret := _m.Called(userID, channelID) - if len(ret) == 0 { - panic("no return value specified for DeleteMembershipsForChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, channelID) @@ -55,10 +47,6 @@ func (_m *ThreadStore) DeleteMembershipsForChannel(userID string, channelID stri func (_m *ThreadStore) DeleteOrphanedRows(limit int) (int64, error) { ret := _m.Called(limit) - if len(ret) == 0 { - panic("no return value specified for DeleteOrphanedRows") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int) (int64, error)); ok { @@ -83,10 +71,6 @@ func (_m *ThreadStore) DeleteOrphanedRows(limit int) (int64, error) { func (_m *ThreadStore) Get(id string) (*model.Thread, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.Thread var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Thread, error)); ok { @@ -113,10 +97,6 @@ func (_m *ThreadStore) Get(id string) (*model.Thread, error) { func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*model.ThreadMembership, error) { ret := _m.Called(userId, postID) - if len(ret) == 0 { - panic("no return value specified for GetMembershipForUser") - } - var r0 *model.ThreadMembership var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.ThreadMembership, error)); ok { @@ -143,10 +123,6 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*mode func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*model.ThreadMembership, error) { ret := _m.Called(userId, teamID) - if len(ret) == 0 { - panic("no return value specified for GetMembershipsForUser") - } - var r0 []*model.ThreadMembership var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]*model.ThreadMembership, error)); ok { @@ -173,10 +149,6 @@ func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*m func (_m *ThreadStore) GetTeamsUnreadForUser(userID string, teamIDs []string, includeUrgentMentionCount bool) (map[string]*model.TeamUnread, error) { ret := _m.Called(userID, teamIDs, includeUrgentMentionCount) - if len(ret) == 0 { - panic("no return value specified for GetTeamsUnreadForUser") - } - var r0 map[string]*model.TeamUnread var r1 error if rf, ok := ret.Get(0).(func(string, []string, bool) (map[string]*model.TeamUnread, error)); ok { @@ -203,10 +175,6 @@ func (_m *ThreadStore) GetTeamsUnreadForUser(userID string, teamIDs []string, in func (_m *ThreadStore) GetThreadFollowers(threadID string, fetchOnlyActive bool) ([]string, error) { ret := _m.Called(threadID, fetchOnlyActive) - if len(ret) == 0 { - panic("no return value specified for GetThreadFollowers") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { @@ -233,10 +201,6 @@ func (_m *ThreadStore) GetThreadFollowers(threadID string, fetchOnlyActive bool) func (_m *ThreadStore) GetThreadForUser(threadMembership *model.ThreadMembership, extended bool, postPriorityIsEnabled bool) (*model.ThreadResponse, error) { ret := _m.Called(threadMembership, extended, postPriorityIsEnabled) - if len(ret) == 0 { - panic("no return value specified for GetThreadForUser") - } - var r0 *model.ThreadResponse var r1 error if rf, ok := ret.Get(0).(func(*model.ThreadMembership, bool, bool) (*model.ThreadResponse, error)); ok { @@ -263,10 +227,6 @@ func (_m *ThreadStore) GetThreadForUser(threadMembership *model.ThreadMembership func (_m *ThreadStore) GetThreadUnreadReplyCount(threadMembership *model.ThreadMembership) (int64, error) { ret := _m.Called(threadMembership) - if len(ret) == 0 { - panic("no return value specified for GetThreadUnreadReplyCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*model.ThreadMembership) (int64, error)); ok { @@ -291,10 +251,6 @@ func (_m *ThreadStore) GetThreadUnreadReplyCount(threadMembership *model.ThreadM func (_m *ThreadStore) GetThreadsForUser(userId string, teamID string, opts model.GetUserThreadsOpts) ([]*model.ThreadResponse, error) { ret := _m.Called(userId, teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetThreadsForUser") - } - var r0 []*model.ThreadResponse var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) ([]*model.ThreadResponse, error)); ok { @@ -321,10 +277,6 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamID string, opts mode func (_m *ThreadStore) GetTotalThreads(userId string, teamID string, opts model.GetUserThreadsOpts) (int64, error) { ret := _m.Called(userId, teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetTotalThreads") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok { @@ -349,10 +301,6 @@ func (_m *ThreadStore) GetTotalThreads(userId string, teamID string, opts model. func (_m *ThreadStore) GetTotalUnreadMentions(userId string, teamID string, opts model.GetUserThreadsOpts) (int64, error) { ret := _m.Called(userId, teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetTotalUnreadMentions") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok { @@ -377,10 +325,6 @@ func (_m *ThreadStore) GetTotalUnreadMentions(userId string, teamID string, opts func (_m *ThreadStore) GetTotalUnreadThreads(userId string, teamID string, opts model.GetUserThreadsOpts) (int64, error) { ret := _m.Called(userId, teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetTotalUnreadThreads") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok { @@ -405,10 +349,6 @@ func (_m *ThreadStore) GetTotalUnreadThreads(userId string, teamID string, opts func (_m *ThreadStore) GetTotalUnreadUrgentMentions(userId string, teamID string, opts model.GetUserThreadsOpts) (int64, error) { ret := _m.Called(userId, teamID, opts) - if len(ret) == 0 { - panic("no return value specified for GetTotalUnreadUrgentMentions") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok { @@ -433,10 +373,6 @@ func (_m *ThreadStore) GetTotalUnreadUrgentMentions(userId string, teamID string func (_m *ThreadStore) MaintainMembership(userID string, postID string, opts store.ThreadMembershipOpts) (*model.ThreadMembership, error) { ret := _m.Called(userID, postID, opts) - if len(ret) == 0 { - panic("no return value specified for MaintainMembership") - } - var r0 *model.ThreadMembership var r1 error if rf, ok := ret.Get(0).(func(string, string, store.ThreadMembershipOpts) (*model.ThreadMembership, error)); ok { @@ -463,10 +399,6 @@ func (_m *ThreadStore) MaintainMembership(userID string, postID string, opts sto func (_m *ThreadStore) MarkAllAsRead(userID string, threadIds []string) error { ret := _m.Called(userID, threadIds) - if len(ret) == 0 { - panic("no return value specified for MarkAllAsRead") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(userID, threadIds) @@ -481,10 +413,6 @@ func (_m *ThreadStore) MarkAllAsRead(userID string, threadIds []string) error { func (_m *ThreadStore) MarkAllAsReadByChannels(userID string, channelIDs []string) error { ret := _m.Called(userID, channelIDs) - if len(ret) == 0 { - panic("no return value specified for MarkAllAsReadByChannels") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(userID, channelIDs) @@ -499,10 +427,6 @@ func (_m *ThreadStore) MarkAllAsReadByChannels(userID string, channelIDs []strin func (_m *ThreadStore) MarkAllAsReadByTeam(userID string, teamID string) error { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for MarkAllAsReadByTeam") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, teamID) @@ -517,10 +441,6 @@ func (_m *ThreadStore) MarkAllAsReadByTeam(userID string, teamID string) error { func (_m *ThreadStore) MarkAsRead(userID string, threadID string, timestamp int64) error { ret := _m.Called(userID, threadID, timestamp) - if len(ret) == 0 { - panic("no return value specified for MarkAsRead") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, int64) error); ok { r0 = rf(userID, threadID, timestamp) @@ -535,10 +455,6 @@ func (_m *ThreadStore) MarkAsRead(userID string, threadID string, timestamp int6 func (_m *ThreadStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalPolicyEndTime int64, limit int64, cursor model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error) { ret := _m.Called(now, globalPolicyEndTime, limit, cursor) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatchForRetentionPolicies") - } - var r0 int64 var r1 model.RetentionPolicyCursor var r2 error @@ -570,10 +486,6 @@ func (_m *ThreadStore) PermanentDeleteBatchForRetentionPolicies(now int64, globa func (_m *ThreadStore) PermanentDeleteBatchThreadMembershipsForRetentionPolicies(now int64, globalPolicyEndTime int64, limit int64, cursor model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error) { ret := _m.Called(now, globalPolicyEndTime, limit, cursor) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBatchThreadMembershipsForRetentionPolicies") - } - var r0 int64 var r1 model.RetentionPolicyCursor var r2 error @@ -605,10 +517,6 @@ func (_m *ThreadStore) PermanentDeleteBatchThreadMembershipsForRetentionPolicies func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*model.ThreadMembership, error) { ret := _m.Called(membership) - if len(ret) == 0 { - panic("no return value specified for UpdateMembership") - } - var r0 *model.ThreadMembership var r1 error if rf, ok := ret.Get(0).(func(*model.ThreadMembership) (*model.ThreadMembership, error)); ok { @@ -631,12 +539,13 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo return r0, r1 } -// NewThreadStore creates a new instance of ThreadStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewThreadStore(t interface { +type mockConstructorTestingTNewThreadStore interface { mock.TestingT Cleanup(func()) -}) *ThreadStore { +} + +// NewThreadStore creates a new instance of ThreadStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewThreadStore(t mockConstructorTestingTNewThreadStore) *ThreadStore { mock := &ThreadStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/TokenStore.go b/server/channels/store/storetest/mocks/TokenStore.go index 3b0c98c1e7..54e3e78894 100644 --- a/server/channels/store/storetest/mocks/TokenStore.go +++ b/server/channels/store/storetest/mocks/TokenStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -23,10 +23,6 @@ func (_m *TokenStore) Cleanup(expiryTime int64) { func (_m *TokenStore) Delete(token string) error { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(token) @@ -41,10 +37,6 @@ func (_m *TokenStore) Delete(token string) error { func (_m *TokenStore) GetAllTokensByType(tokenType string) ([]*model.Token, error) { ret := _m.Called(tokenType) - if len(ret) == 0 { - panic("no return value specified for GetAllTokensByType") - } - var r0 []*model.Token var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Token, error)); ok { @@ -71,10 +63,6 @@ func (_m *TokenStore) GetAllTokensByType(tokenType string) ([]*model.Token, erro func (_m *TokenStore) GetByToken(token string) (*model.Token, error) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for GetByToken") - } - var r0 *model.Token var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Token, error)); ok { @@ -101,10 +89,6 @@ func (_m *TokenStore) GetByToken(token string) (*model.Token, error) { func (_m *TokenStore) RemoveAllTokensByType(tokenType string) error { ret := _m.Called(tokenType) - if len(ret) == 0 { - panic("no return value specified for RemoveAllTokensByType") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(tokenType) @@ -119,10 +103,6 @@ func (_m *TokenStore) RemoveAllTokensByType(tokenType string) error { func (_m *TokenStore) Save(recovery *model.Token) error { ret := _m.Called(recovery) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Token) error); ok { r0 = rf(recovery) @@ -133,12 +113,13 @@ func (_m *TokenStore) Save(recovery *model.Token) error { return r0 } -// NewTokenStore creates a new instance of TokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTokenStore(t interface { +type mockConstructorTestingTNewTokenStore interface { mock.TestingT Cleanup(func()) -}) *TokenStore { +} + +// NewTokenStore creates a new instance of TokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTokenStore(t mockConstructorTestingTNewTokenStore) *TokenStore { mock := &TokenStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/TrueUpReviewStore.go b/server/channels/store/storetest/mocks/TrueUpReviewStore.go index 4fe8d16cd9..38e419341f 100644 --- a/server/channels/store/storetest/mocks/TrueUpReviewStore.go +++ b/server/channels/store/storetest/mocks/TrueUpReviewStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type TrueUpReviewStore struct { func (_m *TrueUpReviewStore) CreateTrueUpReviewStatusRecord(reviewStatus *model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error) { ret := _m.Called(reviewStatus) - if len(ret) == 0 { - panic("no return value specified for CreateTrueUpReviewStatusRecord") - } - var r0 *model.TrueUpReviewStatus var r1 error if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error)); ok { @@ -48,10 +44,6 @@ func (_m *TrueUpReviewStore) CreateTrueUpReviewStatusRecord(reviewStatus *model. func (_m *TrueUpReviewStore) GetTrueUpReviewStatus(dueDate int64) (*model.TrueUpReviewStatus, error) { ret := _m.Called(dueDate) - if len(ret) == 0 { - panic("no return value specified for GetTrueUpReviewStatus") - } - var r0 *model.TrueUpReviewStatus var r1 error if rf, ok := ret.Get(0).(func(int64) (*model.TrueUpReviewStatus, error)); ok { @@ -78,10 +70,6 @@ func (_m *TrueUpReviewStore) GetTrueUpReviewStatus(dueDate int64) (*model.TrueUp func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error) { ret := _m.Called(reviewStatus) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.TrueUpReviewStatus var r1 error if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error)); ok { @@ -104,12 +92,13 @@ func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*mo return r0, r1 } -// NewTrueUpReviewStore creates a new instance of TrueUpReviewStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTrueUpReviewStore(t interface { +type mockConstructorTestingTNewTrueUpReviewStore interface { mock.TestingT Cleanup(func()) -}) *TrueUpReviewStore { +} + +// NewTrueUpReviewStore creates a new instance of TrueUpReviewStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTrueUpReviewStore(t mockConstructorTestingTNewTrueUpReviewStore) *TrueUpReviewStore { mock := &TrueUpReviewStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/UploadSessionStore.go b/server/channels/store/storetest/mocks/UploadSessionStore.go index 4b22f2117e..05fcef13e9 100644 --- a/server/channels/store/storetest/mocks/UploadSessionStore.go +++ b/server/channels/store/storetest/mocks/UploadSessionStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,10 +19,6 @@ type UploadSessionStore struct { func (_m *UploadSessionStore) Delete(id string) error { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(id) @@ -37,10 +33,6 @@ func (_m *UploadSessionStore) Delete(id string) error { func (_m *UploadSessionStore) Get(c request.CTX, id string) (*model.UploadSession, error) { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.UploadSession var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.UploadSession, error)); ok { @@ -67,10 +59,6 @@ func (_m *UploadSessionStore) Get(c request.CTX, id string) (*model.UploadSessio func (_m *UploadSessionStore) GetForUser(userID string) ([]*model.UploadSession, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetForUser") - } - var r0 []*model.UploadSession var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.UploadSession, error)); ok { @@ -97,10 +85,6 @@ func (_m *UploadSessionStore) GetForUser(userID string) ([]*model.UploadSession, func (_m *UploadSessionStore) Save(session *model.UploadSession) (*model.UploadSession, error) { ret := _m.Called(session) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.UploadSession var r1 error if rf, ok := ret.Get(0).(func(*model.UploadSession) (*model.UploadSession, error)); ok { @@ -127,10 +111,6 @@ func (_m *UploadSessionStore) Save(session *model.UploadSession) (*model.UploadS func (_m *UploadSessionStore) Update(session *model.UploadSession) error { ret := _m.Called(session) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.UploadSession) error); ok { r0 = rf(session) @@ -141,12 +121,13 @@ func (_m *UploadSessionStore) Update(session *model.UploadSession) error { return r0 } -// NewUploadSessionStore creates a new instance of UploadSessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewUploadSessionStore(t interface { +type mockConstructorTestingTNewUploadSessionStore interface { mock.TestingT Cleanup(func()) -}) *UploadSessionStore { +} + +// NewUploadSessionStore creates a new instance of UploadSessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewUploadSessionStore(t mockConstructorTestingTNewUploadSessionStore) *UploadSessionStore { mock := &UploadSessionStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/UserAccessTokenStore.go b/server/channels/store/storetest/mocks/UserAccessTokenStore.go index 1536bc5b66..2d86b14219 100644 --- a/server/channels/store/storetest/mocks/UserAccessTokenStore.go +++ b/server/channels/store/storetest/mocks/UserAccessTokenStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type UserAccessTokenStore struct { func (_m *UserAccessTokenStore) Delete(tokenID string) error { ret := _m.Called(tokenID) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(tokenID) @@ -36,10 +32,6 @@ func (_m *UserAccessTokenStore) Delete(tokenID string) error { func (_m *UserAccessTokenStore) DeleteAllForUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for DeleteAllForUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -54,10 +46,6 @@ func (_m *UserAccessTokenStore) DeleteAllForUser(userID string) error { func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, error) { ret := _m.Called(tokenID) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(string) (*model.UserAccessToken, error)); ok { @@ -84,10 +72,6 @@ func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, err func (_m *UserAccessTokenStore) GetAll(offset int, limit int) ([]*model.UserAccessToken, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(int, int) ([]*model.UserAccessToken, error)); ok { @@ -114,10 +98,6 @@ func (_m *UserAccessTokenStore) GetAll(offset int, limit int) ([]*model.UserAcce func (_m *UserAccessTokenStore) GetByToken(tokenString string) (*model.UserAccessToken, error) { ret := _m.Called(tokenString) - if len(ret) == 0 { - panic("no return value specified for GetByToken") - } - var r0 *model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(string) (*model.UserAccessToken, error)); ok { @@ -144,10 +124,6 @@ func (_m *UserAccessTokenStore) GetByToken(tokenString string) (*model.UserAcces func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int) ([]*model.UserAccessToken, error) { ret := _m.Called(userID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetByUser") - } - var r0 []*model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.UserAccessToken, error)); ok { @@ -174,10 +150,6 @@ func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int) func (_m *UserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserAccessToken, error) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(*model.UserAccessToken) (*model.UserAccessToken, error)); ok { @@ -204,10 +176,6 @@ func (_m *UserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserA func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, error) { ret := _m.Called(term) - if len(ret) == 0 { - panic("no return value specified for Search") - } - var r0 []*model.UserAccessToken var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.UserAccessToken, error)); ok { @@ -234,10 +202,6 @@ func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, e func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenID string) error { ret := _m.Called(tokenID) - if len(ret) == 0 { - panic("no return value specified for UpdateTokenDisable") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(tokenID) @@ -252,10 +216,6 @@ func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenID string) error { func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error { ret := _m.Called(tokenID) - if len(ret) == 0 { - panic("no return value specified for UpdateTokenEnable") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(tokenID) @@ -266,12 +226,13 @@ func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error { return r0 } -// NewUserAccessTokenStore creates a new instance of UserAccessTokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewUserAccessTokenStore(t interface { +type mockConstructorTestingTNewUserAccessTokenStore interface { mock.TestingT Cleanup(func()) -}) *UserAccessTokenStore { +} + +// NewUserAccessTokenStore creates a new instance of UserAccessTokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewUserAccessTokenStore(t mockConstructorTestingTNewUserAccessTokenStore) *UserAccessTokenStore { mock := &UserAccessTokenStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/UserStore.go b/server/channels/store/storetest/mocks/UserStore.go index 9dafcb1f58..2b4244708a 100644 --- a/server/channels/store/storetest/mocks/UserStore.go +++ b/server/channels/store/storetest/mocks/UserStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,10 +24,6 @@ type UserStore struct { func (_m *UserStore) AnalyticsActiveCount(timestamp int64, options model.UserCountOptions) (int64, error) { ret := _m.Called(timestamp, options) - if len(ret) == 0 { - panic("no return value specified for AnalyticsActiveCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, model.UserCountOptions) (int64, error)); ok { @@ -52,10 +48,6 @@ func (_m *UserStore) AnalyticsActiveCount(timestamp int64, options model.UserCou func (_m *UserStore) AnalyticsActiveCountForPeriod(startTime int64, endTime int64, options model.UserCountOptions) (int64, error) { ret := _m.Called(startTime, endTime, options) - if len(ret) == 0 { - panic("no return value specified for AnalyticsActiveCountForPeriod") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int64, model.UserCountOptions) (int64, error)); ok { @@ -80,10 +72,6 @@ func (_m *UserStore) AnalyticsActiveCountForPeriod(startTime int64, endTime int6 func (_m *UserStore) AnalyticsGetExternalUsers(hostDomain string) (bool, error) { ret := _m.Called(hostDomain) - if len(ret) == 0 { - panic("no return value specified for AnalyticsGetExternalUsers") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -108,10 +96,6 @@ func (_m *UserStore) AnalyticsGetExternalUsers(hostDomain string) (bool, error) func (_m *UserStore) AnalyticsGetGuestCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for AnalyticsGetGuestCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -136,10 +120,6 @@ func (_m *UserStore) AnalyticsGetGuestCount() (int64, error) { func (_m *UserStore) AnalyticsGetInactiveUsersCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for AnalyticsGetInactiveUsersCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -164,10 +144,6 @@ func (_m *UserStore) AnalyticsGetInactiveUsersCount() (int64, error) { func (_m *UserStore) AnalyticsGetSystemAdminCount() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for AnalyticsGetSystemAdminCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -192,10 +168,6 @@ func (_m *UserStore) AnalyticsGetSystemAdminCount() (int64, error) { func (_m *UserStore) AutocompleteUsersInChannel(rctx request.CTX, teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) { ret := _m.Called(rctx, teamID, channelID, term, options) - if len(ret) == 0 { - panic("no return value specified for AutocompleteUsersInChannel") - } - var r0 *model.UserAutocompleteInChannel var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error)); ok { @@ -222,10 +194,6 @@ func (_m *UserStore) AutocompleteUsersInChannel(rctx request.CTX, teamID string, func (_m *UserStore) ClearAllCustomRoleAssignments() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ClearAllCustomRoleAssignments") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -245,10 +213,6 @@ func (_m *UserStore) ClearCaches() { func (_m *UserStore) Count(options model.UserCountOptions) (int64, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for Count") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(model.UserCountOptions) (int64, error)); ok { @@ -273,10 +237,6 @@ func (_m *UserStore) Count(options model.UserCountOptions) (int64, error) { func (_m *UserStore) DeactivateGuests() ([]string, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for DeactivateGuests") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func() ([]string, error)); ok { @@ -303,10 +263,6 @@ func (_m *UserStore) DeactivateGuests() ([]string, error) { func (_m *UserStore) DemoteUserToGuest(userID string) (*model.User, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for DemoteUserToGuest") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok { @@ -333,10 +289,6 @@ func (_m *UserStore) DemoteUserToGuest(userID string) (*model.User, error) { func (_m *UserStore) Get(ctx context.Context, id string) (*model.User, error) { ret := _m.Called(ctx, id) - if len(ret) == 0 { - panic("no return value specified for Get") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*model.User, error)); ok { @@ -363,10 +315,6 @@ func (_m *UserStore) Get(ctx context.Context, id string) (*model.User, error) { func (_m *UserStore) GetAll() ([]*model.User, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func() ([]*model.User, error)); ok { @@ -393,10 +341,6 @@ func (_m *UserStore) GetAll() ([]*model.User, error) { func (_m *UserStore) GetAllAfter(limit int, afterID string) ([]*model.User, error) { ret := _m.Called(limit, afterID) - if len(ret) == 0 { - panic("no return value specified for GetAllAfter") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(int, string) ([]*model.User, error)); ok { @@ -423,10 +367,6 @@ func (_m *UserStore) GetAllAfter(limit int, afterID string) ([]*model.User, erro func (_m *UserStore) GetAllNotInAuthService(authServices []string) ([]*model.User, error) { ret := _m.Called(authServices) - if len(ret) == 0 { - panic("no return value specified for GetAllNotInAuthService") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func([]string) ([]*model.User, error)); ok { @@ -453,10 +393,6 @@ func (_m *UserStore) GetAllNotInAuthService(authServices []string) ([]*model.Use func (_m *UserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetAllProfiles") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -483,10 +419,6 @@ func (_m *UserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.Use func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelID string, allowFromCache bool) (map[string]*model.User, error) { ret := _m.Called(ctx, channelID, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetAllProfilesInChannel") - } - var r0 map[string]*model.User var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool) (map[string]*model.User, error)); ok { @@ -513,10 +445,6 @@ func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelID stri func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User, error) { ret := _m.Called(authService) - if len(ret) == 0 { - panic("no return value specified for GetAllUsingAuthService") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.User, error)); ok { @@ -543,10 +471,6 @@ func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User, func (_m *UserStore) GetAnyUnreadPostCountForChannel(userID string, channelID string) (int64, error) { ret := _m.Called(userID, channelID) - if len(ret) == 0 { - panic("no return value specified for GetAnyUnreadPostCountForChannel") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string) (int64, error)); ok { @@ -571,10 +495,6 @@ func (_m *UserStore) GetAnyUnreadPostCountForChannel(userID string, channelID st func (_m *UserStore) GetByAuth(authData *string, authService string) (*model.User, error) { ret := _m.Called(authData, authService) - if len(ret) == 0 { - panic("no return value specified for GetByAuth") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(*string, string) (*model.User, error)); ok { @@ -601,10 +521,6 @@ func (_m *UserStore) GetByAuth(authData *string, authService string) (*model.Use func (_m *UserStore) GetByEmail(email string) (*model.User, error) { ret := _m.Called(email) - if len(ret) == 0 { - panic("no return value specified for GetByEmail") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok { @@ -631,10 +547,6 @@ func (_m *UserStore) GetByEmail(email string) (*model.User, error) { func (_m *UserStore) GetByRemoteID(remoteID string) (*model.User, error) { ret := _m.Called(remoteID) - if len(ret) == 0 { - panic("no return value specified for GetByRemoteID") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok { @@ -661,10 +573,6 @@ func (_m *UserStore) GetByRemoteID(remoteID string) (*model.User, error) { func (_m *UserStore) GetByUsername(username string) (*model.User, error) { ret := _m.Called(username) - if len(ret) == 0 { - panic("no return value specified for GetByUsername") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok { @@ -691,10 +599,6 @@ func (_m *UserStore) GetByUsername(username string) (*model.User, error) { func (_m *UserStore) GetChannelGroupUsers(channelID string) ([]*model.User, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetChannelGroupUsers") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.User, error)); ok { @@ -721,10 +625,6 @@ func (_m *UserStore) GetChannelGroupUsers(channelID string) ([]*model.User, erro func (_m *UserStore) GetEtagForAllProfiles() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetEtagForAllProfiles") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -739,10 +639,6 @@ func (_m *UserStore) GetEtagForAllProfiles() string { func (_m *UserStore) GetEtagForProfiles(teamID string) string { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetEtagForProfiles") - } - var r0 string if rf, ok := ret.Get(0).(func(string) string); ok { r0 = rf(teamID) @@ -757,10 +653,6 @@ func (_m *UserStore) GetEtagForProfiles(teamID string) string { func (_m *UserStore) GetEtagForProfilesNotInTeam(teamID string) string { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetEtagForProfilesNotInTeam") - } - var r0 string if rf, ok := ret.Get(0).(func(string) string); ok { r0 = rf(teamID) @@ -775,10 +667,6 @@ func (_m *UserStore) GetEtagForProfilesNotInTeam(teamID string) string { func (_m *UserStore) GetForLogin(loginID string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) { ret := _m.Called(loginID, allowSignInWithUsername, allowSignInWithEmail) - if len(ret) == 0 { - panic("no return value specified for GetForLogin") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(string, bool, bool) (*model.User, error)); ok { @@ -805,10 +693,6 @@ func (_m *UserStore) GetForLogin(loginID string, allowSignInWithUsername bool, a func (_m *UserStore) GetKnownUsers(userID string) ([]string, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetKnownUsers") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -835,10 +719,6 @@ func (_m *UserStore) GetKnownUsers(userID string) ([]string, error) { func (_m *UserStore) GetMany(ctx context.Context, ids []string) ([]*model.User, error) { ret := _m.Called(ctx, ids) - if len(ret) == 0 { - panic("no return value specified for GetMany") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*model.User, error)); ok { @@ -865,10 +745,6 @@ func (_m *UserStore) GetMany(ctx context.Context, ids []string) ([]*model.User, func (_m *UserStore) GetNewUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(teamID, offset, limit, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetNewUsersForTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -895,10 +771,6 @@ func (_m *UserStore) GetNewUsersForTeam(teamID string, offset int, limit int, vi func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userID string, channelIds []string) (map[string][]*model.User, error) { ret := _m.Called(userID, channelIds) - if len(ret) == 0 { - panic("no return value specified for GetProfileByGroupChannelIdsForUser") - } - var r0 map[string][]*model.User var r1 error if rf, ok := ret.Get(0).(func(string, []string) (map[string][]*model.User, error)); ok { @@ -925,10 +797,6 @@ func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userID string, channelId func (_m *UserStore) GetProfileByIds(ctx context.Context, userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) ([]*model.User, error) { ret := _m.Called(ctx, userIds, options, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetProfileByIds") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(context.Context, []string, *store.UserGetByIdsOpts, bool) ([]*model.User, error)); ok { @@ -955,10 +823,6 @@ func (_m *UserStore) GetProfileByIds(ctx context.Context, userIds []string, opti func (_m *UserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetProfiles") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -985,10 +849,6 @@ func (_m *UserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, func (_m *UserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(usernames, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetProfilesByUsernames") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func([]string, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1015,10 +875,6 @@ func (_m *UserStore) GetProfilesByUsernames(usernames []string, viewRestrictions func (_m *UserStore) GetProfilesInChannel(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetProfilesInChannel") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -1045,10 +901,6 @@ func (_m *UserStore) GetProfilesInChannel(options *model.UserGetOptions) ([]*mod func (_m *UserStore) GetProfilesInChannelByAdmin(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetProfilesInChannelByAdmin") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -1075,10 +927,6 @@ func (_m *UserStore) GetProfilesInChannelByAdmin(options *model.UserGetOptions) func (_m *UserStore) GetProfilesInChannelByStatus(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetProfilesInChannelByStatus") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -1105,10 +953,6 @@ func (_m *UserStore) GetProfilesInChannelByStatus(options *model.UserGetOptions) func (_m *UserStore) GetProfilesNotInChannel(teamID string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(teamID, channelId, groupConstrained, offset, limit, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetProfilesNotInChannel") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1135,10 +979,6 @@ func (_m *UserStore) GetProfilesNotInChannel(teamID string, channelId string, gr func (_m *UserStore) GetProfilesNotInTeam(teamID string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(teamID, groupConstrained, offset, limit, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetProfilesNotInTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, bool, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1165,10 +1005,6 @@ func (_m *UserStore) GetProfilesNotInTeam(teamID string, groupConstrained bool, func (_m *UserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*model.User, error) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetProfilesWithoutTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, error)); ok { @@ -1195,10 +1031,6 @@ func (_m *UserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*m func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { ret := _m.Called(teamID, offset, limit, viewRestrictions) - if len(ret) == 0 { - panic("no return value specified for GetRecentlyActiveUsersForTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok { @@ -1225,10 +1057,6 @@ func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamID string, offset int, li func (_m *UserStore) GetSystemAdminProfiles() (map[string]*model.User, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetSystemAdminProfiles") - } - var r0 map[string]*model.User var r1 error if rf, ok := ret.Get(0).(func() (map[string]*model.User, error)); ok { @@ -1255,10 +1083,6 @@ func (_m *UserStore) GetSystemAdminProfiles() (map[string]*model.User, error) { func (_m *UserStore) GetTeamGroupUsers(teamID string) ([]*model.User, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetTeamGroupUsers") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.User, error)); ok { @@ -1285,10 +1109,6 @@ func (_m *UserStore) GetTeamGroupUsers(teamID string) ([]*model.User, error) { func (_m *UserStore) GetUnreadCount(userID string, isCRTEnabled bool) (int64, error) { ret := _m.Called(userID, isCRTEnabled) - if len(ret) == 0 { - panic("no return value specified for GetUnreadCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, bool) (int64, error)); ok { @@ -1313,10 +1133,6 @@ func (_m *UserStore) GetUnreadCount(userID string, isCRTEnabled bool) (int64, er func (_m *UserStore) GetUnreadCountForChannel(userID string, channelID string) (int64, error) { ret := _m.Called(userID, channelID) - if len(ret) == 0 { - panic("no return value specified for GetUnreadCountForChannel") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string) (int64, error)); ok { @@ -1341,10 +1157,6 @@ func (_m *UserStore) GetUnreadCountForChannel(userID string, channelID string) ( func (_m *UserStore) GetUserCountForReport(filter *model.UserReportOptions) (int64, error) { ret := _m.Called(filter) - if len(ret) == 0 { - panic("no return value specified for GetUserCountForReport") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*model.UserReportOptions) (int64, error)); ok { @@ -1369,10 +1181,6 @@ func (_m *UserStore) GetUserCountForReport(filter *model.UserReportOptions) (int func (_m *UserStore) GetUserReport(filter *model.UserReportOptions) ([]*model.UserReportQuery, error) { ret := _m.Called(filter) - if len(ret) == 0 { - panic("no return value specified for GetUserReport") - } - var r0 []*model.UserReportQuery var r1 error if rf, ok := ret.Get(0).(func(*model.UserReportOptions) ([]*model.UserReportQuery, error)); ok { @@ -1399,10 +1207,6 @@ func (_m *UserStore) GetUserReport(filter *model.UserReportOptions) ([]*model.Us func (_m *UserStore) GetUsersBatchForIndexing(startTime int64, startFileID string, limit int) ([]*model.UserForIndexing, error) { ret := _m.Called(startTime, startFileID, limit) - if len(ret) == 0 { - panic("no return value specified for GetUsersBatchForIndexing") - } - var r0 []*model.UserForIndexing var r1 error if rf, ok := ret.Get(0).(func(int64, string, int) ([]*model.UserForIndexing, error)); ok { @@ -1429,10 +1233,6 @@ func (_m *UserStore) GetUsersBatchForIndexing(startTime int64, startFileID strin func (_m *UserStore) GetUsersWithInvalidEmails(page int, perPage int, restrictedDomains string) ([]*model.User, error) { ret := _m.Called(page, perPage, restrictedDomains) - if len(ret) == 0 { - panic("no return value specified for GetUsersWithInvalidEmails") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(int, int, string) ([]*model.User, error)); ok { @@ -1459,10 +1259,6 @@ func (_m *UserStore) GetUsersWithInvalidEmails(page int, perPage int, restricted func (_m *UserStore) InferSystemInstallDate() (int64, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for InferSystemInstallDate") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -1487,10 +1283,6 @@ func (_m *UserStore) InferSystemInstallDate() (int64, error) { func (_m *UserStore) InsertUsers(users []*model.User) error { ret := _m.Called(users) - if len(ret) == 0 { - panic("no return value specified for InsertUsers") - } - var r0 error if rf, ok := ret.Get(0).(func([]*model.User) error); ok { r0 = rf(users) @@ -1520,10 +1312,6 @@ func (_m *UserStore) InvalidateProfilesInChannelCacheByUser(userID string) { func (_m *UserStore) IsEmpty(excludeBots bool) (bool, error) { ret := _m.Called(excludeBots) - if len(ret) == 0 { - panic("no return value specified for IsEmpty") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(bool) (bool, error)); ok { @@ -1548,10 +1336,6 @@ func (_m *UserStore) IsEmpty(excludeBots bool) (bool, error) { func (_m *UserStore) PermanentDelete(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -1566,10 +1350,6 @@ func (_m *UserStore) PermanentDelete(userID string) error { func (_m *UserStore) PromoteGuestToUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PromoteGuestToUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -1584,10 +1364,6 @@ func (_m *UserStore) PromoteGuestToUser(userID string) error { func (_m *UserStore) RefreshPostStatsForUsers() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for RefreshPostStatsForUsers") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1602,10 +1378,6 @@ func (_m *UserStore) RefreshPostStatsForUsers() error { func (_m *UserStore) ResetAuthDataToEmailForUsers(service string, userIDs []string, includeDeleted bool, dryRun bool) (int, error) { ret := _m.Called(service, userIDs, includeDeleted, dryRun) - if len(ret) == 0 { - panic("no return value specified for ResetAuthDataToEmailForUsers") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, []string, bool, bool) (int, error)); ok { @@ -1630,10 +1402,6 @@ func (_m *UserStore) ResetAuthDataToEmailForUsers(service string, userIDs []stri func (_m *UserStore) ResetLastPictureUpdate(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for ResetLastPictureUpdate") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -1648,10 +1416,6 @@ func (_m *UserStore) ResetLastPictureUpdate(userID string) error { func (_m *UserStore) Save(rctx request.CTX, user *model.User) (*model.User, error) { ret := _m.Called(rctx, user) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.User) (*model.User, error)); ok { @@ -1678,10 +1442,6 @@ func (_m *UserStore) Save(rctx request.CTX, user *model.User) (*model.User, erro func (_m *UserStore) Search(rctx request.CTX, teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(rctx, teamID, term, options) - if len(ret) == 0 { - panic("no return value specified for Search") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1708,10 +1468,6 @@ func (_m *UserStore) Search(rctx request.CTX, teamID string, term string, option func (_m *UserStore) SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(channelID, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchInChannel") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1738,10 +1494,6 @@ func (_m *UserStore) SearchInChannel(channelID string, term string, options *mod func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(groupID, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchInGroup") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1768,10 +1520,6 @@ func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.U func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(teamID, channelID, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchNotInChannel") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1798,10 +1546,6 @@ func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term st func (_m *UserStore) SearchNotInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(groupID, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchNotInGroup") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1828,10 +1572,6 @@ func (_m *UserStore) SearchNotInGroup(groupID string, term string, options *mode func (_m *UserStore) SearchNotInTeam(notInTeamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(notInTeamID, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchNotInTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1858,10 +1598,6 @@ func (_m *UserStore) SearchNotInTeam(notInTeamID string, term string, options *m func (_m *UserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error) { ret := _m.Called(term, options) - if len(ret) == 0 { - panic("no return value specified for SearchWithoutTeam") - } - var r0 []*model.User var r1 error if rf, ok := ret.Get(0).(func(string, *model.UserSearchOptions) ([]*model.User, error)); ok { @@ -1888,10 +1624,6 @@ func (_m *UserStore) SearchWithoutTeam(term string, options *model.UserSearchOpt func (_m *UserStore) Update(rctx request.CTX, user *model.User, allowRoleUpdate bool) (*model.UserUpdate, error) { ret := _m.Called(rctx, user, allowRoleUpdate) - if len(ret) == 0 { - panic("no return value specified for Update") - } - var r0 *model.UserUpdate var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.User, bool) (*model.UserUpdate, error)); ok { @@ -1918,10 +1650,6 @@ func (_m *UserStore) Update(rctx request.CTX, user *model.User, allowRoleUpdate func (_m *UserStore) UpdateAuthData(userID string, service string, authData *string, email string, resetMfa bool) (string, error) { ret := _m.Called(userID, service, authData, email, resetMfa) - if len(ret) == 0 { - panic("no return value specified for UpdateAuthData") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string, *string, string, bool) (string, error)); ok { @@ -1946,10 +1674,6 @@ func (_m *UserStore) UpdateAuthData(userID string, service string, authData *str func (_m *UserStore) UpdateFailedPasswordAttempts(userID string, attempts int) error { ret := _m.Called(userID, attempts) - if len(ret) == 0 { - panic("no return value specified for UpdateFailedPasswordAttempts") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(userID, attempts) @@ -1964,10 +1688,6 @@ func (_m *UserStore) UpdateFailedPasswordAttempts(userID string, attempts int) e func (_m *UserStore) UpdateLastLogin(userID string, lastLogin int64) error { ret := _m.Called(userID, lastLogin) - if len(ret) == 0 { - panic("no return value specified for UpdateLastLogin") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(userID, lastLogin) @@ -1982,10 +1702,6 @@ func (_m *UserStore) UpdateLastLogin(userID string, lastLogin int64) error { func (_m *UserStore) UpdateLastPictureUpdate(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for UpdateLastPictureUpdate") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -2000,10 +1716,6 @@ func (_m *UserStore) UpdateLastPictureUpdate(userID string) error { func (_m *UserStore) UpdateMfaActive(userID string, active bool) error { ret := _m.Called(userID, active) - if len(ret) == 0 { - panic("no return value specified for UpdateMfaActive") - } - var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(userID, active) @@ -2018,10 +1730,6 @@ func (_m *UserStore) UpdateMfaActive(userID string, active bool) error { func (_m *UserStore) UpdateMfaSecret(userID string, secret string) error { ret := _m.Called(userID, secret) - if len(ret) == 0 { - panic("no return value specified for UpdateMfaSecret") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, secret) @@ -2036,10 +1744,6 @@ func (_m *UserStore) UpdateMfaSecret(userID string, secret string) error { func (_m *UserStore) UpdateNotifyProps(userID string, props map[string]string) error { ret := _m.Called(userID, props) - if len(ret) == 0 { - panic("no return value specified for UpdateNotifyProps") - } - var r0 error if rf, ok := ret.Get(0).(func(string, map[string]string) error); ok { r0 = rf(userID, props) @@ -2054,10 +1758,6 @@ func (_m *UserStore) UpdateNotifyProps(userID string, props map[string]string) e func (_m *UserStore) UpdatePassword(userID string, newPassword string) error { ret := _m.Called(userID, newPassword) - if len(ret) == 0 { - panic("no return value specified for UpdatePassword") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, newPassword) @@ -2072,10 +1772,6 @@ func (_m *UserStore) UpdatePassword(userID string, newPassword string) error { func (_m *UserStore) UpdateUpdateAt(userID string) (int64, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for UpdateUpdateAt") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -2100,10 +1796,6 @@ func (_m *UserStore) UpdateUpdateAt(userID string) (int64, error) { func (_m *UserStore) VerifyEmail(userID string, email string) (string, error) { ret := _m.Called(userID, email) - if len(ret) == 0 { - panic("no return value specified for VerifyEmail") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { @@ -2124,12 +1816,13 @@ func (_m *UserStore) VerifyEmail(userID string, email string) (string, error) { return r0, r1 } -// NewUserStore creates a new instance of UserStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewUserStore(t interface { +type mockConstructorTestingTNewUserStore interface { mock.TestingT Cleanup(func()) -}) *UserStore { +} + +// NewUserStore creates a new instance of UserStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewUserStore(t mockConstructorTestingTNewUserStore) *UserStore { mock := &UserStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/UserTermsOfServiceStore.go b/server/channels/store/storetest/mocks/UserTermsOfServiceStore.go index 06ae3c10a3..bf3eebd906 100644 --- a/server/channels/store/storetest/mocks/UserTermsOfServiceStore.go +++ b/server/channels/store/storetest/mocks/UserTermsOfServiceStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type UserTermsOfServiceStore struct { func (_m *UserTermsOfServiceStore) Delete(userID string, termsOfServiceId string) error { ret := _m.Called(userID, termsOfServiceId) - if len(ret) == 0 { - panic("no return value specified for Delete") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, termsOfServiceId) @@ -36,10 +32,6 @@ func (_m *UserTermsOfServiceStore) Delete(userID string, termsOfServiceId string func (_m *UserTermsOfServiceStore) GetByUser(userID string) (*model.UserTermsOfService, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetByUser") - } - var r0 *model.UserTermsOfService var r1 error if rf, ok := ret.Get(0).(func(string) (*model.UserTermsOfService, error)); ok { @@ -66,10 +58,6 @@ func (_m *UserTermsOfServiceStore) GetByUser(userID string) (*model.UserTermsOfS func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, error) { ret := _m.Called(userTermsOfService) - if len(ret) == 0 { - panic("no return value specified for Save") - } - var r0 *model.UserTermsOfService var r1 error if rf, ok := ret.Get(0).(func(*model.UserTermsOfService) (*model.UserTermsOfService, error)); ok { @@ -92,12 +80,13 @@ func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfSer return r0, r1 } -// NewUserTermsOfServiceStore creates a new instance of UserTermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewUserTermsOfServiceStore(t interface { +type mockConstructorTestingTNewUserTermsOfServiceStore interface { mock.TestingT Cleanup(func()) -}) *UserTermsOfServiceStore { +} + +// NewUserTermsOfServiceStore creates a new instance of UserTermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewUserTermsOfServiceStore(t mockConstructorTestingTNewUserTermsOfServiceStore) *UserTermsOfServiceStore { mock := &UserTermsOfServiceStore{} mock.Mock.Test(t) diff --git a/server/channels/store/storetest/mocks/WebhookStore.go b/server/channels/store/storetest/mocks/WebhookStore.go index 9831e88ead..28c31103b1 100644 --- a/server/channels/store/storetest/mocks/WebhookStore.go +++ b/server/channels/store/storetest/mocks/WebhookStore.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,10 +18,6 @@ type WebhookStore struct { func (_m *WebhookStore) AnalyticsIncomingCount(teamID string) (int64, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for AnalyticsIncomingCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -46,10 +42,6 @@ func (_m *WebhookStore) AnalyticsIncomingCount(teamID string) (int64, error) { func (_m *WebhookStore) AnalyticsOutgoingCount(teamID string) (int64, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for AnalyticsOutgoingCount") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -79,10 +71,6 @@ func (_m *WebhookStore) ClearCaches() { func (_m *WebhookStore) DeleteIncoming(webhookID string, timestamp int64) error { ret := _m.Called(webhookID, timestamp) - if len(ret) == 0 { - panic("no return value specified for DeleteIncoming") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(webhookID, timestamp) @@ -97,10 +85,6 @@ func (_m *WebhookStore) DeleteIncoming(webhookID string, timestamp int64) error func (_m *WebhookStore) DeleteOutgoing(webhookID string, timestamp int64) error { ret := _m.Called(webhookID, timestamp) - if len(ret) == 0 { - panic("no return value specified for DeleteOutgoing") - } - var r0 error if rf, ok := ret.Get(0).(func(string, int64) error); ok { r0 = rf(webhookID, timestamp) @@ -115,10 +99,6 @@ func (_m *WebhookStore) DeleteOutgoing(webhookID string, timestamp int64) error func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error) { ret := _m.Called(id, allowFromCache) - if len(ret) == 0 { - panic("no return value specified for GetIncoming") - } - var r0 *model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, bool) (*model.IncomingWebhook, error)); ok { @@ -145,10 +125,6 @@ func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.Inco func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.IncomingWebhook, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for GetIncomingByChannel") - } - var r0 []*model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.IncomingWebhook, error)); ok { @@ -175,10 +151,6 @@ func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.Incomin func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int) ([]*model.IncomingWebhook, error) { ret := _m.Called(teamID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetIncomingByTeam") - } - var r0 []*model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.IncomingWebhook, error)); ok { @@ -205,10 +177,6 @@ func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int) func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userID string, offset int, limit int) ([]*model.IncomingWebhook, error) { ret := _m.Called(teamID, userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetIncomingByTeamByUser") - } - var r0 []*model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.IncomingWebhook, error)); ok { @@ -235,10 +203,6 @@ func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userID string, of func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.IncomingWebhook, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetIncomingList") - } - var r0 []*model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(int, int) ([]*model.IncomingWebhook, error)); ok { @@ -265,10 +229,6 @@ func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.Incomin func (_m *WebhookStore) GetIncomingListByUser(userID string, offset int, limit int) ([]*model.IncomingWebhook, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetIncomingListByUser") - } - var r0 []*model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.IncomingWebhook, error)); ok { @@ -295,10 +255,6 @@ func (_m *WebhookStore) GetIncomingListByUser(userID string, offset int, limit i func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetOutgoing") - } - var r0 *model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string) (*model.OutgoingWebhook, error)); ok { @@ -325,10 +281,6 @@ func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) { func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(channelID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingByChannel") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -355,10 +307,6 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userID string, offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(channelID, userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingByChannelByUser") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -385,10 +333,6 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userID stri func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(teamID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingByTeam") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -415,10 +359,6 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int) func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userID string, offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(teamID, userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingByTeamByUser") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -445,10 +385,6 @@ func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userID string, of func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingList") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -475,10 +411,6 @@ func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.Outgoin func (_m *WebhookStore) GetOutgoingListByUser(userID string, offset int, limit int) ([]*model.OutgoingWebhook, error) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetOutgoingListByUser") - } - var r0 []*model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok { @@ -510,10 +442,6 @@ func (_m *WebhookStore) InvalidateWebhookCache(webhook string) { func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelID string) error { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteIncomingByChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(channelID) @@ -528,10 +456,6 @@ func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelID string) error func (_m *WebhookStore) PermanentDeleteIncomingByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteIncomingByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -546,10 +470,6 @@ func (_m *WebhookStore) PermanentDeleteIncomingByUser(userID string) error { func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelID string) error { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteOutgoingByChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(channelID) @@ -564,10 +484,6 @@ func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelID string) error func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userID string) error { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteOutgoingByUser") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -582,10 +498,6 @@ func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userID string) error { func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) { ret := _m.Called(webhook) - if len(ret) == 0 { - panic("no return value specified for SaveIncoming") - } - var r0 *model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) (*model.IncomingWebhook, error)); ok { @@ -612,10 +524,6 @@ func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.Inc func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) { ret := _m.Called(webhook) - if len(ret) == 0 { - panic("no return value specified for SaveOutgoing") - } - var r0 *model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) (*model.OutgoingWebhook, error)); ok { @@ -642,10 +550,6 @@ func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.Out func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) { ret := _m.Called(webhook) - if len(ret) == 0 { - panic("no return value specified for UpdateIncoming") - } - var r0 *model.IncomingWebhook var r1 error if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) (*model.IncomingWebhook, error)); ok { @@ -672,10 +576,6 @@ func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.I func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) { ret := _m.Called(hook) - if len(ret) == 0 { - panic("no return value specified for UpdateOutgoing") - } - var r0 *model.OutgoingWebhook var r1 error if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) (*model.OutgoingWebhook, error)); ok { @@ -698,12 +598,13 @@ func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.Outg return r0, r1 } -// NewWebhookStore creates a new instance of WebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWebhookStore(t interface { +type mockConstructorTestingTNewWebhookStore interface { mock.TestingT Cleanup(func()) -}) *WebhookStore { +} + +// NewWebhookStore creates a new instance of WebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewWebhookStore(t mockConstructorTestingTNewWebhookStore) *WebhookStore { mock := &WebhookStore{} mock.Mock.Test(t) diff --git a/server/channels/utils/mocks/LicenseValidatorIface.go b/server/channels/utils/mocks/LicenseValidatorIface.go index 4c38386f1f..fe77edecba 100644 --- a/server/channels/utils/mocks/LicenseValidatorIface.go +++ b/server/channels/utils/mocks/LicenseValidatorIface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make misc-mocks`. @@ -18,10 +18,6 @@ type LicenseValidatorIface struct { func (_m *LicenseValidatorIface) LicenseFromBytes(licenseBytes []byte) (*model.License, *model.AppError) { ret := _m.Called(licenseBytes) - if len(ret) == 0 { - panic("no return value specified for LicenseFromBytes") - } - var r0 *model.License var r1 *model.AppError if rf, ok := ret.Get(0).(func([]byte) (*model.License, *model.AppError)); ok { @@ -50,10 +46,6 @@ func (_m *LicenseValidatorIface) LicenseFromBytes(licenseBytes []byte) (*model.L func (_m *LicenseValidatorIface) ValidateLicense(signed []byte) (string, error) { ret := _m.Called(signed) - if len(ret) == 0 { - panic("no return value specified for ValidateLicense") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func([]byte) (string, error)); ok { @@ -74,12 +66,13 @@ func (_m *LicenseValidatorIface) ValidateLicense(signed []byte) (string, error) return r0, r1 } -// NewLicenseValidatorIface creates a new instance of LicenseValidatorIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLicenseValidatorIface(t interface { +type mockConstructorTestingTNewLicenseValidatorIface interface { mock.TestingT Cleanup(func()) -}) *LicenseValidatorIface { +} + +// NewLicenseValidatorIface creates a new instance of LicenseValidatorIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLicenseValidatorIface(t mockConstructorTestingTNewLicenseValidatorIface) *LicenseValidatorIface { mock := &LicenseValidatorIface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/AccountMigrationInterface.go b/server/einterfaces/mocks/AccountMigrationInterface.go index e269bf4520..4c30dba709 100644 --- a/server/einterfaces/mocks/AccountMigrationInterface.go +++ b/server/einterfaces/mocks/AccountMigrationInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type AccountMigrationInterface struct { func (_m *AccountMigrationInterface) MigrateToLdap(c request.CTX, fromAuthService string, foreignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError { ret := _m.Called(c, fromAuthService, foreignUserFieldNameToMatch, force, dryRun) - if len(ret) == 0 { - panic("no return value specified for MigrateToLdap") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string, bool, bool) *model.AppError); ok { r0 = rf(c, fromAuthService, foreignUserFieldNameToMatch, force, dryRun) @@ -39,10 +35,6 @@ func (_m *AccountMigrationInterface) MigrateToLdap(c request.CTX, fromAuthServic func (_m *AccountMigrationInterface) MigrateToSaml(c request.CTX, fromAuthService string, usersMap map[string]string, auto bool, dryRun bool) *model.AppError { ret := _m.Called(c, fromAuthService, usersMap, auto, dryRun) - if len(ret) == 0 { - panic("no return value specified for MigrateToSaml") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string, bool, bool) *model.AppError); ok { r0 = rf(c, fromAuthService, usersMap, auto, dryRun) @@ -55,12 +47,13 @@ func (_m *AccountMigrationInterface) MigrateToSaml(c request.CTX, fromAuthServic return r0 } -// NewAccountMigrationInterface creates a new instance of AccountMigrationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewAccountMigrationInterface(t interface { +type mockConstructorTestingTNewAccountMigrationInterface interface { mock.TestingT Cleanup(func()) -}) *AccountMigrationInterface { +} + +// NewAccountMigrationInterface creates a new instance of AccountMigrationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewAccountMigrationInterface(t mockConstructorTestingTNewAccountMigrationInterface) *AccountMigrationInterface { mock := &AccountMigrationInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/CloudInterface.go b/server/einterfaces/mocks/CloudInterface.go index adafc72dd3..96bced70e3 100644 --- a/server/einterfaces/mocks/CloudInterface.go +++ b/server/einterfaces/mocks/CloudInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type CloudInterface struct { func (_m *CloudInterface) ApplyIPFilters(userID string, ranges *model.AllowedIPRanges) (*model.AllowedIPRanges, error) { ret := _m.Called(userID, ranges) - if len(ret) == 0 { - panic("no return value specified for ApplyIPFilters") - } - var r0 *model.AllowedIPRanges var r1 error if rf, ok := ret.Get(0).(func(string, *model.AllowedIPRanges) (*model.AllowedIPRanges, error)); ok { @@ -49,10 +45,6 @@ func (_m *CloudInterface) ApplyIPFilters(userID string, ranges *model.AllowedIPR func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error) { ret := _m.Called(req) - if len(ret) == 0 { - panic("no return value specified for BootstrapSelfHostedSignup") - } - var r0 *model.BootstrapSelfHostedSignupResponse var r1 error if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error)); ok { @@ -79,10 +71,6 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error) { ret := _m.Called(userID, subscriptionID, subscriptionChange) - if len(ret) == 0 { - panic("no return value specified for ChangeSubscription") - } - var r0 *model.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) (*model.Subscription, error)); ok { @@ -109,10 +97,6 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin func (_m *CloudInterface) CheckCWSConnection(userId string) error { ret := _m.Called(userId) - if len(ret) == 0 { - panic("no return value specified for CheckCWSConnection") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userId) @@ -127,10 +111,6 @@ func (_m *CloudInterface) CheckCWSConnection(userId string) error { func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error { ret := _m.Called(userID, confirmRequest) - if len(ret) == 0 { - panic("no return value specified for ConfirmCustomerPayment") - } - var r0 error if rf, ok := ret.Get(0).(func(string, *model.ConfirmPaymentMethodRequest) error); ok { r0 = rf(userID, confirmRequest) @@ -145,10 +125,6 @@ func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest * func (_m *CloudInterface) ConfirmSelfHostedExpansion(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error) { ret := _m.Called(req, requesterEmail) - if len(ret) == 0 { - panic("no return value specified for ConfirmSelfHostedExpansion") - } - var r0 *model.SelfHostedSignupConfirmResponse var r1 error if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok { @@ -175,10 +151,6 @@ func (_m *CloudInterface) ConfirmSelfHostedExpansion(req model.SelfHostedConfirm func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error) { ret := _m.Called(req, requesterEmail) - if len(ret) == 0 { - panic("no return value specified for ConfirmSelfHostedSignup") - } - var r0 *model.SelfHostedSignupConfirmResponse var r1 error if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok { @@ -205,10 +177,6 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay func (_m *CloudInterface) ConfirmSelfHostedSignupLicenseApplication() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ConfirmSelfHostedSignupLicenseApplication") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -223,10 +191,6 @@ func (_m *CloudInterface) ConfirmSelfHostedSignupLicenseApplication() error { func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for CreateCustomerPayment") - } - var r0 *model.StripeSetupIntent var r1 error if rf, ok := ret.Get(0).(func(string) (*model.StripeSetupIntent, error)); ok { @@ -253,10 +217,6 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCustomerForm, requesterEmail string) (*model.SelfHostedSignupCustomerResponse, error) { ret := _m.Called(req, requesterEmail) - if len(ret) == 0 { - panic("no return value specified for CreateCustomerSelfHostedSignup") - } - var r0 *model.SelfHostedSignupCustomerResponse var r1 error if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) (*model.SelfHostedSignupCustomerResponse, error)); ok { @@ -283,10 +243,6 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string, userCount int) (*model.SubscriptionHistory, error) { ret := _m.Called(userID, userCount) - if len(ret) == 0 { - panic("no return value specified for CreateOrUpdateSubscriptionHistoryEvent") - } - var r0 *model.SubscriptionHistory var r1 error if rf, ok := ret.Get(0).(func(string, int) (*model.SubscriptionHistory, error)); ok { @@ -313,10 +269,6 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string, func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetCloudCustomer") - } - var r0 *model.CloudCustomer var r1 error if rf, ok := ret.Get(0).(func(string) (*model.CloudCustomer, error)); ok { @@ -343,10 +295,6 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetCloudLimits") - } - var r0 *model.ProductLimits var r1 error if rf, ok := ret.Get(0).(func(string) (*model.ProductLimits, error)); ok { @@ -373,10 +321,6 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*model.Product, error) { ret := _m.Called(userID, productID) - if len(ret) == 0 { - panic("no return value specified for GetCloudProduct") - } - var r0 *model.Product var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.Product, error)); ok { @@ -403,10 +347,6 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error) { ret := _m.Called(userID, includeLegacyProducts) - if len(ret) == 0 { - panic("no return value specified for GetCloudProducts") - } - var r0 []*model.Product var r1 error if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Product, error)); ok { @@ -433,10 +373,6 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts func (_m *CloudInterface) GetIPFilters(userID string) (*model.AllowedIPRanges, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetIPFilters") - } - var r0 *model.AllowedIPRanges var r1 error if rf, ok := ret.Get(0).(func(string) (*model.AllowedIPRanges, error)); ok { @@ -463,10 +399,6 @@ func (_m *CloudInterface) GetIPFilters(userID string) (*model.AllowedIPRanges, e func (_m *CloudInterface) GetInstallation(userID string) (*model.Installation, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetInstallation") - } - var r0 *model.Installation var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Installation, error)); ok { @@ -493,10 +425,6 @@ func (_m *CloudInterface) GetInstallation(userID string) (*model.Installation, e func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte, string, error) { ret := _m.Called(userID, invoiceID) - if len(ret) == 0 { - panic("no return value specified for GetInvoicePDF") - } - var r0 []byte var r1 string var r2 error @@ -530,10 +458,6 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.Invoice, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetInvoicesForSubscription") - } - var r0 []*model.Invoice var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Invoice, error)); ok { @@ -560,10 +484,6 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string) (*model.SubscriptionLicenseSelfServeStatusResponse, error) { ret := _m.Called(userID, token) - if len(ret) == 0 { - panic("no return value specified for GetLicenseSelfServeStatus") - } - var r0 *model.SubscriptionLicenseSelfServeStatusResponse var r1 error if rf, ok := ret.Get(0).(func(string, string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)); ok { @@ -590,10 +510,6 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string) func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, string, error) { ret := _m.Called(invoiceID) - if len(ret) == 0 { - panic("no return value specified for GetSelfHostedInvoicePDF") - } - var r0 []byte var r1 string var r2 error @@ -627,10 +543,6 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str func (_m *CloudInterface) GetSelfHostedInvoices(rctx request.CTX) ([]*model.Invoice, error) { ret := _m.Called(rctx) - if len(ret) == 0 { - panic("no return value specified for GetSelfHostedInvoices") - } - var r0 []*model.Invoice var r1 error if rf, ok := ret.Get(0).(func(request.CTX) ([]*model.Invoice, error)); ok { @@ -657,10 +569,6 @@ func (_m *CloudInterface) GetSelfHostedInvoices(rctx request.CTX) ([]*model.Invo func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetSelfHostedProducts") - } - var r0 []*model.Product var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Product, error)); ok { @@ -687,10 +595,6 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetSubscription") - } - var r0 *model.Subscription var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Subscription, error)); ok { @@ -717,10 +621,6 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e func (_m *CloudInterface) HandleLicenseChange() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for HandleLicenseChange") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -735,10 +635,6 @@ func (_m *CloudInterface) HandleLicenseChange() error { func (_m *CloudInterface) InvalidateCaches() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for InvalidateCaches") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -753,10 +649,6 @@ func (_m *CloudInterface) InvalidateCaches() error { func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string, newValidBusinessEmail string) (*model.Subscription, error) { ret := _m.Called(userID, subscriptionID, newValidBusinessEmail) - if len(ret) == 0 { - panic("no return value specified for RequestCloudTrial") - } - var r0 *model.Subscription var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (*model.Subscription, error)); ok { @@ -783,10 +675,6 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string func (_m *CloudInterface) SelfHostedSignupAvailable() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for SelfHostedSignupAvailable") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -801,10 +689,6 @@ func (_m *CloudInterface) SelfHostedSignupAvailable() error { func (_m *CloudInterface) SelfServeDeleteWorkspace(userID string, deletionRequest *model.WorkspaceDeletionRequest) error { ret := _m.Called(userID, deletionRequest) - if len(ret) == 0 { - panic("no return value specified for SelfServeDeleteWorkspace") - } - var r0 error if rf, ok := ret.Get(0).(func(string, *model.WorkspaceDeletionRequest) error); ok { r0 = rf(userID, deletionRequest) @@ -819,10 +703,6 @@ func (_m *CloudInterface) SelfServeDeleteWorkspace(userID string, deletionReques func (_m *CloudInterface) SubmitTrueUpReview(userID string, trueUpReviewProfile map[string]interface{}) error { ret := _m.Called(userID, trueUpReviewProfile) - if len(ret) == 0 { - panic("no return value specified for SubmitTrueUpReview") - } - var r0 error if rf, ok := ret.Get(0).(func(string, map[string]interface{}) error); ok { r0 = rf(userID, trueUpReviewProfile) @@ -837,10 +717,6 @@ func (_m *CloudInterface) SubmitTrueUpReview(userID string, trueUpReviewProfile func (_m *CloudInterface) SubscribeToNewsletter(userID string, req *model.SubscribeNewsletterRequest) error { ret := _m.Called(userID, req) - if len(ret) == 0 { - panic("no return value specified for SubscribeToNewsletter") - } - var r0 error if rf, ok := ret.Get(0).(func(string, *model.SubscribeNewsletterRequest) error); ok { r0 = rf(userID, req) @@ -855,10 +731,6 @@ func (_m *CloudInterface) SubscribeToNewsletter(userID string, req *model.Subscr func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error) { ret := _m.Called(userID, customerInfo) - if len(ret) == 0 { - panic("no return value specified for UpdateCloudCustomer") - } - var r0 *model.CloudCustomer var r1 error if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) (*model.CloudCustomer, error)); ok { @@ -885,10 +757,6 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error) { ret := _m.Called(userID, address) - if len(ret) == 0 { - panic("no return value specified for UpdateCloudCustomerAddress") - } - var r0 *model.CloudCustomer var r1 error if rf, ok := ret.Get(0).(func(string, *model.Address) (*model.CloudCustomer, error)); ok { @@ -915,10 +783,6 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) error { ret := _m.Called(userID, email) - if len(ret) == 0 { - panic("no return value specified for ValidateBusinessEmail") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(userID, email) @@ -929,12 +793,13 @@ func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) err return r0 } -// NewCloudInterface creates a new instance of CloudInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewCloudInterface(t interface { +type mockConstructorTestingTNewCloudInterface interface { mock.TestingT Cleanup(func()) -}) *CloudInterface { +} + +// NewCloudInterface creates a new instance of CloudInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCloudInterface(t mockConstructorTestingTNewCloudInterface) *CloudInterface { mock := &CloudInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/CloudJobInterface.go b/server/einterfaces/mocks/CloudJobInterface.go index ddd62237d2..9365c9095c 100644 --- a/server/einterfaces/mocks/CloudJobInterface.go +++ b/server/einterfaces/mocks/CloudJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type CloudJobInterface struct { func (_m *CloudJobInterface) MakeScheduler() jobs.Scheduler { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeScheduler") - } - var r0 jobs.Scheduler if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok { r0 = rf() @@ -40,10 +36,6 @@ func (_m *CloudJobInterface) MakeScheduler() jobs.Scheduler { func (_m *CloudJobInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -56,12 +48,13 @@ func (_m *CloudJobInterface) MakeWorker() model.Worker { return r0 } -// NewCloudJobInterface creates a new instance of CloudJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewCloudJobInterface(t interface { +type mockConstructorTestingTNewCloudJobInterface interface { mock.TestingT Cleanup(func()) -}) *CloudJobInterface { +} + +// NewCloudJobInterface creates a new instance of CloudJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCloudJobInterface(t mockConstructorTestingTNewCloudJobInterface) *CloudJobInterface { mock := &CloudJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ClusterInterface.go b/server/einterfaces/mocks/ClusterInterface.go index 911edaa395..9530431f58 100644 --- a/server/einterfaces/mocks/ClusterInterface.go +++ b/server/einterfaces/mocks/ClusterInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type ClusterInterface struct { func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError { ret := _m.Called(previousConfig, newConfig, sendToOtherServer) - if len(ret) == 0 { - panic("no return value specified for ConfigChanged") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Config, *model.Config, bool) *model.AppError); ok { r0 = rf(previousConfig, newConfig, sendToOtherServer) @@ -40,10 +36,6 @@ func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfi func (_m *ClusterInterface) GetClusterId() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetClusterId") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -58,10 +50,6 @@ func (_m *ClusterInterface) GetClusterId() string { func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetClusterInfos") - } - var r0 []*model.ClusterInfo if rf, ok := ret.Get(0).(func() []*model.ClusterInfo); ok { r0 = rf() @@ -78,10 +66,6 @@ func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo { func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetClusterStats") - } - var r0 []*model.ClusterStats var r1 *model.AppError if rf, ok := ret.Get(0).(func() ([]*model.ClusterStats, *model.AppError)); ok { @@ -110,10 +94,6 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.AppError) { ret := _m.Called(page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetLogs") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok { @@ -142,10 +122,6 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetMyClusterInfo") - } - var r0 *model.ClusterInfo if rf, ok := ret.Get(0).(func() *model.ClusterInfo); ok { r0 = rf() @@ -162,10 +138,6 @@ func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo { func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPluginStatuses") - } - var r0 model.PluginStatuses var r1 *model.AppError if rf, ok := ret.Get(0).(func() (model.PluginStatuses, *model.AppError)); ok { @@ -194,10 +166,6 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap func (_m *ClusterInterface) HealthScore() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for HealthScore") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -212,10 +180,6 @@ func (_m *ClusterInterface) HealthScore() int { func (_m *ClusterInterface) IsLeader() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsLeader") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -235,10 +199,6 @@ func (_m *ClusterInterface) NotifyMsg(buf []byte) { func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]string, *model.AppError) { ret := _m.Called(page, perPage) - if len(ret) == 0 { - panic("no return value specified for QueryLogs") - } - var r0 map[string][]string var r1 *model.AppError if rf, ok := ret.Get(0).(func(int, int) (map[string][]string, *model.AppError)); ok { @@ -277,10 +237,6 @@ func (_m *ClusterInterface) SendClusterMessage(msg *model.ClusterMessage) { func (_m *ClusterInterface) SendClusterMessageToNode(nodeID string, msg *model.ClusterMessage) error { ret := _m.Called(nodeID, msg) - if len(ret) == 0 { - panic("no return value specified for SendClusterMessageToNode") - } - var r0 error if rf, ok := ret.Get(0).(func(string, *model.ClusterMessage) error); ok { r0 = rf(nodeID, msg) @@ -301,12 +257,13 @@ func (_m *ClusterInterface) StopInterNodeCommunication() { _m.Called() } -// NewClusterInterface creates a new instance of ClusterInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClusterInterface(t interface { +type mockConstructorTestingTNewClusterInterface interface { mock.TestingT Cleanup(func()) -}) *ClusterInterface { +} + +// NewClusterInterface creates a new instance of ClusterInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewClusterInterface(t mockConstructorTestingTNewClusterInterface) *ClusterInterface { mock := &ClusterInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ClusterMessageHandler.go b/server/einterfaces/mocks/ClusterMessageHandler.go index d969ec3e4c..6eeab343bb 100644 --- a/server/einterfaces/mocks/ClusterMessageHandler.go +++ b/server/einterfaces/mocks/ClusterMessageHandler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,12 +19,13 @@ func (_m *ClusterMessageHandler) Execute(msg *model.ClusterMessage) { _m.Called(msg) } -// NewClusterMessageHandler creates a new instance of ClusterMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClusterMessageHandler(t interface { +type mockConstructorTestingTNewClusterMessageHandler interface { mock.TestingT Cleanup(func()) -}) *ClusterMessageHandler { +} + +// NewClusterMessageHandler creates a new instance of ClusterMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewClusterMessageHandler(t mockConstructorTestingTNewClusterMessageHandler) *ClusterMessageHandler { mock := &ClusterMessageHandler{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ComplianceInterface.go b/server/einterfaces/mocks/ComplianceInterface.go index 0eb3b53952..ea5d98b258 100644 --- a/server/einterfaces/mocks/ComplianceInterface.go +++ b/server/einterfaces/mocks/ComplianceInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type ComplianceInterface struct { func (_m *ComplianceInterface) RunComplianceJob(rctx request.CTX, job *model.Compliance) *model.AppError { ret := _m.Called(rctx, job) - if len(ret) == 0 { - panic("no return value specified for RunComplianceJob") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Compliance) *model.AppError); ok { r0 = rf(rctx, job) @@ -40,12 +36,13 @@ func (_m *ComplianceInterface) StartComplianceDailyJob() { _m.Called() } -// NewComplianceInterface creates a new instance of ComplianceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewComplianceInterface(t interface { +type mockConstructorTestingTNewComplianceInterface interface { mock.TestingT Cleanup(func()) -}) *ComplianceInterface { +} + +// NewComplianceInterface creates a new instance of ComplianceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewComplianceInterface(t mockConstructorTestingTNewComplianceInterface) *ComplianceInterface { mock := &ComplianceInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/DataRetentionInterface.go b/server/einterfaces/mocks/DataRetentionInterface.go index cce90c35a3..ea03a72b20 100644 --- a/server/einterfaces/mocks/DataRetentionInterface.go +++ b/server/einterfaces/mocks/DataRetentionInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,10 +18,6 @@ type DataRetentionInterface struct { func (_m *DataRetentionInterface) AddChannelsToPolicy(policyID string, channelIDs []string) *model.AppError { ret := _m.Called(policyID, channelIDs) - if len(ret) == 0 { - panic("no return value specified for AddChannelsToPolicy") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok { r0 = rf(policyID, channelIDs) @@ -38,10 +34,6 @@ func (_m *DataRetentionInterface) AddChannelsToPolicy(policyID string, channelID func (_m *DataRetentionInterface) AddTeamsToPolicy(policyID string, teamIDs []string) *model.AppError { ret := _m.Called(policyID, teamIDs) - if len(ret) == 0 { - panic("no return value specified for AddTeamsToPolicy") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok { r0 = rf(policyID, teamIDs) @@ -58,10 +50,6 @@ func (_m *DataRetentionInterface) AddTeamsToPolicy(policyID string, teamIDs []st func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) { ret := _m.Called(policy) - if len(ret) == 0 { - panic("no return value specified for CreatePolicy") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok { @@ -90,10 +78,6 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith func (_m *DataRetentionInterface) DeletePolicy(policyID string) *model.AppError { ret := _m.Called(policyID) - if len(ret) == 0 { - panic("no return value specified for DeletePolicy") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(policyID) @@ -110,10 +94,6 @@ func (_m *DataRetentionInterface) DeletePolicy(policyID string) *model.AppError func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForChannelList, *model.AppError) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannelPoliciesForUser") - } - var r0 *model.RetentionPolicyForChannelList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForChannelList, *model.AppError)); ok { @@ -142,10 +122,6 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset int, limit int) (*model.ChannelsWithCount, *model.AppError) { ret := _m.Called(policyID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetChannelsForPolicy") - } - var r0 *model.ChannelsWithCount var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (*model.ChannelsWithCount, *model.AppError)); ok { @@ -174,10 +150,6 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolicy, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetGlobalPolicy") - } - var r0 *model.GlobalRetentionPolicy var r1 *model.AppError if rf, ok := ret.Get(0).(func() (*model.GlobalRetentionPolicy, *model.AppError)); ok { @@ -206,10 +178,6 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError) { ret := _m.Called(offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetPolicies") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCountsList var r1 *model.AppError if rf, ok := ret.Get(0).(func(int, int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)); ok { @@ -238,10 +206,6 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPoliciesCount") - } - var r0 int64 var r1 *model.AppError if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok { @@ -268,10 +232,6 @@ func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) { func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) { ret := _m.Called(policyID) - if len(ret) == 0 { - panic("no return value specified for GetPolicy") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok { @@ -300,10 +260,6 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForTeamList, *model.AppError) { ret := _m.Called(userID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetTeamPoliciesForUser") - } - var r0 *model.RetentionPolicyForTeamList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForTeamList, *model.AppError)); ok { @@ -332,10 +288,6 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int, limit int) (*model.TeamsWithCount, *model.AppError) { ret := _m.Called(policyID, offset, limit) - if len(ret) == 0 { - panic("no return value specified for GetTeamsForPolicy") - } - var r0 *model.TeamsWithCount var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (*model.TeamsWithCount, *model.AppError)); ok { @@ -364,10 +316,6 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int, func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) { ret := _m.Called(patch) - if len(ret) == 0 { - panic("no return value specified for PatchPolicy") - } - var r0 *model.RetentionPolicyWithTeamAndChannelCounts var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok { @@ -396,10 +344,6 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe func (_m *DataRetentionInterface) RemoveChannelsFromPolicy(policyID string, channelIDs []string) *model.AppError { ret := _m.Called(policyID, channelIDs) - if len(ret) == 0 { - panic("no return value specified for RemoveChannelsFromPolicy") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok { r0 = rf(policyID, channelIDs) @@ -416,10 +360,6 @@ func (_m *DataRetentionInterface) RemoveChannelsFromPolicy(policyID string, chan func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs []string) *model.AppError { ret := _m.Called(policyID, teamIDs) - if len(ret) == 0 { - panic("no return value specified for RemoveTeamsFromPolicy") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok { r0 = rf(policyID, teamIDs) @@ -432,12 +372,13 @@ func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs return r0 } -// NewDataRetentionInterface creates a new instance of DataRetentionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDataRetentionInterface(t interface { +type mockConstructorTestingTNewDataRetentionInterface interface { mock.TestingT Cleanup(func()) -}) *DataRetentionInterface { +} + +// NewDataRetentionInterface creates a new instance of DataRetentionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDataRetentionInterface(t mockConstructorTestingTNewDataRetentionInterface) *DataRetentionInterface { mock := &DataRetentionInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/DataRetentionJobInterface.go b/server/einterfaces/mocks/DataRetentionJobInterface.go index d1390ed65e..8b6d90107f 100644 --- a/server/einterfaces/mocks/DataRetentionJobInterface.go +++ b/server/einterfaces/mocks/DataRetentionJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type DataRetentionJobInterface struct { func (_m *DataRetentionJobInterface) MakeScheduler() jobs.Scheduler { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeScheduler") - } - var r0 jobs.Scheduler if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok { r0 = rf() @@ -40,10 +36,6 @@ func (_m *DataRetentionJobInterface) MakeScheduler() jobs.Scheduler { func (_m *DataRetentionJobInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -56,12 +48,13 @@ func (_m *DataRetentionJobInterface) MakeWorker() model.Worker { return r0 } -// NewDataRetentionJobInterface creates a new instance of DataRetentionJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDataRetentionJobInterface(t interface { +type mockConstructorTestingTNewDataRetentionJobInterface interface { mock.TestingT Cleanup(func()) -}) *DataRetentionJobInterface { +} + +// NewDataRetentionJobInterface creates a new instance of DataRetentionJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDataRetentionJobInterface(t mockConstructorTestingTNewDataRetentionJobInterface) *DataRetentionJobInterface { mock := &DataRetentionJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go b/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go index 9580ae23ce..0f155f391b 100644 --- a/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go +++ b/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type ElasticsearchAggregatorInterface struct { func (_m *ElasticsearchAggregatorInterface) MakeScheduler() jobs.Scheduler { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeScheduler") - } - var r0 jobs.Scheduler if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok { r0 = rf() @@ -40,10 +36,6 @@ func (_m *ElasticsearchAggregatorInterface) MakeScheduler() jobs.Scheduler { func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -56,12 +48,13 @@ func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker { return r0 } -// NewElasticsearchAggregatorInterface creates a new instance of ElasticsearchAggregatorInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewElasticsearchAggregatorInterface(t interface { +type mockConstructorTestingTNewElasticsearchAggregatorInterface interface { mock.TestingT Cleanup(func()) -}) *ElasticsearchAggregatorInterface { +} + +// NewElasticsearchAggregatorInterface creates a new instance of ElasticsearchAggregatorInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewElasticsearchAggregatorInterface(t mockConstructorTestingTNewElasticsearchAggregatorInterface) *ElasticsearchAggregatorInterface { mock := &ElasticsearchAggregatorInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ElasticsearchIndexerInterface.go b/server/einterfaces/mocks/ElasticsearchIndexerInterface.go index 3e350af75a..7b6a0dd66b 100644 --- a/server/einterfaces/mocks/ElasticsearchIndexerInterface.go +++ b/server/einterfaces/mocks/ElasticsearchIndexerInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,10 +18,6 @@ type ElasticsearchIndexerInterface struct { func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -34,12 +30,13 @@ func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker { return r0 } -// NewElasticsearchIndexerInterface creates a new instance of ElasticsearchIndexerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewElasticsearchIndexerInterface(t interface { +type mockConstructorTestingTNewElasticsearchIndexerInterface interface { mock.TestingT Cleanup(func()) -}) *ElasticsearchIndexerInterface { +} + +// NewElasticsearchIndexerInterface creates a new instance of ElasticsearchIndexerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewElasticsearchIndexerInterface(t mockConstructorTestingTNewElasticsearchIndexerInterface) *ElasticsearchIndexerInterface { mock := &ElasticsearchIndexerInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/IPFilteringInterface.go b/server/einterfaces/mocks/IPFilteringInterface.go index 7ecb30d9a6..196fe49406 100644 --- a/server/einterfaces/mocks/IPFilteringInterface.go +++ b/server/einterfaces/mocks/IPFilteringInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,10 +18,6 @@ type IPFilteringInterface struct { func (_m *IPFilteringInterface) ApplyIPFilters(allowedIPRanges *model.AllowedIPRanges) (*model.AllowedIPRanges, error) { ret := _m.Called(allowedIPRanges) - if len(ret) == 0 { - panic("no return value specified for ApplyIPFilters") - } - var r0 *model.AllowedIPRanges var r1 error if rf, ok := ret.Get(0).(func(*model.AllowedIPRanges) (*model.AllowedIPRanges, error)); ok { @@ -48,10 +44,6 @@ func (_m *IPFilteringInterface) ApplyIPFilters(allowedIPRanges *model.AllowedIPR func (_m *IPFilteringInterface) GetIPFilters() (*model.AllowedIPRanges, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetIPFilters") - } - var r0 *model.AllowedIPRanges var r1 error if rf, ok := ret.Get(0).(func() (*model.AllowedIPRanges, error)); ok { @@ -74,12 +66,13 @@ func (_m *IPFilteringInterface) GetIPFilters() (*model.AllowedIPRanges, error) { return r0, r1 } -// NewIPFilteringInterface creates a new instance of IPFilteringInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewIPFilteringInterface(t interface { +type mockConstructorTestingTNewIPFilteringInterface interface { mock.TestingT Cleanup(func()) -}) *IPFilteringInterface { +} + +// NewIPFilteringInterface creates a new instance of IPFilteringInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewIPFilteringInterface(t mockConstructorTestingTNewIPFilteringInterface) *IPFilteringInterface { mock := &IPFilteringInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/IndexerJobInterface.go b/server/einterfaces/mocks/IndexerJobInterface.go index 671fcc60d6..1c0a6c4cbc 100644 --- a/server/einterfaces/mocks/IndexerJobInterface.go +++ b/server/einterfaces/mocks/IndexerJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,10 +18,6 @@ type IndexerJobInterface struct { func (_m *IndexerJobInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -34,12 +30,13 @@ func (_m *IndexerJobInterface) MakeWorker() model.Worker { return r0 } -// NewIndexerJobInterface creates a new instance of IndexerJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewIndexerJobInterface(t interface { +type mockConstructorTestingTNewIndexerJobInterface interface { mock.TestingT Cleanup(func()) -}) *IndexerJobInterface { +} + +// NewIndexerJobInterface creates a new instance of IndexerJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewIndexerJobInterface(t mockConstructorTestingTNewIndexerJobInterface) *IndexerJobInterface { mock := &IndexerJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LdapInterface.go b/server/einterfaces/mocks/LdapInterface.go index cabdf55035..665f65451a 100644 --- a/server/einterfaces/mocks/LdapInterface.go +++ b/server/einterfaces/mocks/LdapInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type LdapInterface struct { func (_m *LdapInterface) CheckPassword(c request.CTX, id string, password string) *model.AppError { ret := _m.Called(c, id, password) - if len(ret) == 0 { - panic("no return value specified for CheckPassword") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.AppError); ok { r0 = rf(c, id, password) @@ -39,10 +35,6 @@ func (_m *LdapInterface) CheckPassword(c request.CTX, id string, password string func (_m *LdapInterface) CheckPasswordAuthData(c request.CTX, authData string, password string) *model.AppError { ret := _m.Called(c, authData, password) - if len(ret) == 0 { - panic("no return value specified for CheckPasswordAuthData") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.AppError); ok { r0 = rf(c, authData, password) @@ -59,10 +51,6 @@ func (_m *LdapInterface) CheckPasswordAuthData(c request.CTX, authData string, p func (_m *LdapInterface) CheckProviderAttributes(c request.CTX, LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string { ret := _m.Called(c, LS, ouser, patch) - if len(ret) == 0 { - panic("no return value specified for CheckProviderAttributes") - } - var r0 string if rf, ok := ret.Get(0).(func(request.CTX, *model.LdapSettings, *model.User, *model.UserPatch) string); ok { r0 = rf(c, LS, ouser, patch) @@ -77,10 +65,6 @@ func (_m *LdapInterface) CheckProviderAttributes(c request.CTX, LS *model.LdapSe func (_m *LdapInterface) DoLogin(c request.CTX, id string, password string) (*model.User, *model.AppError) { ret := _m.Called(c, id, password) - if len(ret) == 0 { - panic("no return value specified for DoLogin") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.User, *model.AppError)); ok { @@ -109,10 +93,6 @@ func (_m *LdapInterface) DoLogin(c request.CTX, id string, password string) (*mo func (_m *LdapInterface) FirstLoginSync(c request.CTX, user *model.User, userAuthService string, userAuthData string, email string) *model.AppError { ret := _m.Called(c, user, userAuthService, userAuthData, email) - if len(ret) == 0 { - panic("no return value specified for FirstLoginSync") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.User, string, string, string) *model.AppError); ok { r0 = rf(c, user, userAuthService, userAuthData, email) @@ -129,10 +109,6 @@ func (_m *LdapInterface) FirstLoginSync(c request.CTX, user *model.User, userAut func (_m *LdapInterface) GetADLdapIdFromSAMLId(c request.CTX, authData string) string { ret := _m.Called(c, authData) - if len(ret) == 0 { - panic("no return value specified for GetADLdapIdFromSAMLId") - } - var r0 string if rf, ok := ret.Get(0).(func(request.CTX, string) string); ok { r0 = rf(c, authData) @@ -147,10 +123,6 @@ func (_m *LdapInterface) GetADLdapIdFromSAMLId(c request.CTX, authData string) s func (_m *LdapInterface) GetAllGroupsPage(rctx request.CTX, page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) { ret := _m.Called(rctx, page, perPage, opts) - if len(ret) == 0 { - panic("no return value specified for GetAllGroupsPage") - } - var r0 []*model.Group var r1 int var r2 *model.AppError @@ -186,10 +158,6 @@ func (_m *LdapInterface) GetAllGroupsPage(rctx request.CTX, page int, perPage in func (_m *LdapInterface) GetAllLdapUsers(c request.CTX) ([]*model.User, *model.AppError) { ret := _m.Called(c) - if len(ret) == 0 { - panic("no return value specified for GetAllLdapUsers") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) ([]*model.User, *model.AppError)); ok { @@ -218,10 +186,6 @@ func (_m *LdapInterface) GetAllLdapUsers(c request.CTX) ([]*model.User, *model.A func (_m *LdapInterface) GetGroup(rctx request.CTX, groupUID string) (*model.Group, *model.AppError) { ret := _m.Called(rctx, groupUID) - if len(ret) == 0 { - panic("no return value specified for GetGroup") - } - var r0 *model.Group var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.Group, *model.AppError)); ok { @@ -250,10 +214,6 @@ func (_m *LdapInterface) GetGroup(rctx request.CTX, groupUID string) (*model.Gro func (_m *LdapInterface) GetSAMLIdFromADLdapId(c request.CTX, authData string) string { ret := _m.Called(c, authData) - if len(ret) == 0 { - panic("no return value specified for GetSAMLIdFromADLdapId") - } - var r0 string if rf, ok := ret.Get(0).(func(request.CTX, string) string); ok { r0 = rf(c, authData) @@ -268,10 +228,6 @@ func (_m *LdapInterface) GetSAMLIdFromADLdapId(c request.CTX, authData string) s func (_m *LdapInterface) GetUser(c request.CTX, id string) (*model.User, *model.AppError) { ret := _m.Called(c, id) - if len(ret) == 0 { - panic("no return value specified for GetUser") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.User, *model.AppError)); ok { @@ -300,10 +256,6 @@ func (_m *LdapInterface) GetUser(c request.CTX, id string) (*model.User, *model. func (_m *LdapInterface) GetUserAttributes(rctx request.CTX, id string, attributes []string) (map[string]string, *model.AppError) { ret := _m.Called(rctx, id, attributes) - if len(ret) == 0 { - panic("no return value specified for GetUserAttributes") - } - var r0 map[string]string var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, []string) (map[string]string, *model.AppError)); ok { @@ -332,10 +284,6 @@ func (_m *LdapInterface) GetUserAttributes(rctx request.CTX, id string, attribut func (_m *LdapInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string, string) { ret := _m.Called(rctx) - if len(ret) == 0 { - panic("no return value specified for GetVendorNameAndVendorVersion") - } - var r0 string var r1 string if rf, ok := ret.Get(0).(func(request.CTX) (string, string)); ok { @@ -360,10 +308,6 @@ func (_m *LdapInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) error { ret := _m.Called(c, toAttribute) - if len(ret) == 0 { - panic("no return value specified for MigrateIDAttribute") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok { r0 = rf(c, toAttribute) @@ -378,10 +322,6 @@ func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) e func (_m *LdapInterface) RunTest(rctx request.CTX) *model.AppError { ret := _m.Called(rctx) - if len(ret) == 0 { - panic("no return value specified for RunTest") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok { r0 = rf(rctx) @@ -398,10 +338,6 @@ func (_m *LdapInterface) RunTest(rctx request.CTX) *model.AppError { func (_m *LdapInterface) StartSynchronizeJob(c request.CTX, waitForJobToFinish bool, includeRemovedMembers bool) (*model.Job, *model.AppError) { ret := _m.Called(c, waitForJobToFinish, includeRemovedMembers) - if len(ret) == 0 { - panic("no return value specified for StartSynchronizeJob") - } - var r0 *model.Job var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, bool, bool) (*model.Job, *model.AppError)); ok { @@ -430,10 +366,6 @@ func (_m *LdapInterface) StartSynchronizeJob(c request.CTX, waitForJobToFinish b func (_m *LdapInterface) SwitchToLdap(c request.CTX, userID string, ldapID string, ldapPassword string) *model.AppError { ret := _m.Called(c, userID, ldapID, ldapPassword) - if len(ret) == 0 { - panic("no return value specified for SwitchToLdap") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string, string) *model.AppError); ok { r0 = rf(c, userID, ldapID, ldapPassword) @@ -451,12 +383,13 @@ func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 mo _m.Called(_a0, _a1, _a2) } -// NewLdapInterface creates a new instance of LdapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLdapInterface(t interface { +type mockConstructorTestingTNewLdapInterface interface { mock.TestingT Cleanup(func()) -}) *LdapInterface { +} + +// NewLdapInterface creates a new instance of LdapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLdapInterface(t mockConstructorTestingTNewLdapInterface) *LdapInterface { mock := &LdapInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LdapSyncInterface.go b/server/einterfaces/mocks/LdapSyncInterface.go index 690e460e5d..e5f4ae9ada 100644 --- a/server/einterfaces/mocks/LdapSyncInterface.go +++ b/server/einterfaces/mocks/LdapSyncInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type LdapSyncInterface struct { func (_m *LdapSyncInterface) MakeScheduler() jobs.Scheduler { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeScheduler") - } - var r0 jobs.Scheduler if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok { r0 = rf() @@ -40,10 +36,6 @@ func (_m *LdapSyncInterface) MakeScheduler() jobs.Scheduler { func (_m *LdapSyncInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -56,12 +48,13 @@ func (_m *LdapSyncInterface) MakeWorker() model.Worker { return r0 } -// NewLdapSyncInterface creates a new instance of LdapSyncInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLdapSyncInterface(t interface { +type mockConstructorTestingTNewLdapSyncInterface interface { mock.TestingT Cleanup(func()) -}) *LdapSyncInterface { +} + +// NewLdapSyncInterface creates a new instance of LdapSyncInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLdapSyncInterface(t mockConstructorTestingTNewLdapSyncInterface) *LdapSyncInterface { mock := &LdapSyncInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LicenseInterface.go b/server/einterfaces/mocks/LicenseInterface.go index 8e5634ebfe..44606c5906 100644 --- a/server/einterfaces/mocks/LicenseInterface.go +++ b/server/einterfaces/mocks/LicenseInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,10 +18,6 @@ type LicenseInterface struct { func (_m *LicenseInterface) CanStartTrial() (bool, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for CanStartTrial") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func() (bool, error)); ok { @@ -46,10 +42,6 @@ func (_m *LicenseInterface) CanStartTrial() (bool, error) { func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPrevTrial") - } - var r0 *model.License var r1 error if rf, ok := ret.Get(0).(func() (*model.License, error)); ok { @@ -72,12 +64,13 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) { return r0, r1 } -// NewLicenseInterface creates a new instance of LicenseInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLicenseInterface(t interface { +type mockConstructorTestingTNewLicenseInterface interface { mock.TestingT Cleanup(func()) -}) *LicenseInterface { +} + +// NewLicenseInterface creates a new instance of LicenseInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLicenseInterface(t mockConstructorTestingTNewLicenseInterface) *LicenseInterface { mock := &LicenseInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MessageExportInterface.go b/server/einterfaces/mocks/MessageExportInterface.go index c5c09c2ba0..42bf0a3d63 100644 --- a/server/einterfaces/mocks/MessageExportInterface.go +++ b/server/einterfaces/mocks/MessageExportInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type MessageExportInterface struct { func (_m *MessageExportInterface) RunExport(c request.CTX, format string, since int64, limit int) (int64, *model.AppError) { ret := _m.Called(c, format, since, limit) - if len(ret) == 0 { - panic("no return value specified for RunExport") - } - var r0 int64 var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, int64, int) (int64, *model.AppError)); ok { @@ -49,10 +45,6 @@ func (_m *MessageExportInterface) RunExport(c request.CTX, format string, since func (_m *MessageExportInterface) StartSynchronizeJob(c request.CTX, exportFromTimestamp int64) (*model.Job, *model.AppError) { ret := _m.Called(c, exportFromTimestamp) - if len(ret) == 0 { - panic("no return value specified for StartSynchronizeJob") - } - var r0 *model.Job var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, int64) (*model.Job, *model.AppError)); ok { @@ -77,12 +69,13 @@ func (_m *MessageExportInterface) StartSynchronizeJob(c request.CTX, exportFromT return r0, r1 } -// NewMessageExportInterface creates a new instance of MessageExportInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMessageExportInterface(t interface { +type mockConstructorTestingTNewMessageExportInterface interface { mock.TestingT Cleanup(func()) -}) *MessageExportInterface { +} + +// NewMessageExportInterface creates a new instance of MessageExportInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMessageExportInterface(t mockConstructorTestingTNewMessageExportInterface) *MessageExportInterface { mock := &MessageExportInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MessageExportJobInterface.go b/server/einterfaces/mocks/MessageExportJobInterface.go index 0159f2adf0..e33dd12d48 100644 --- a/server/einterfaces/mocks/MessageExportJobInterface.go +++ b/server/einterfaces/mocks/MessageExportJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,10 +20,6 @@ type MessageExportJobInterface struct { func (_m *MessageExportJobInterface) MakeScheduler() jobs.Scheduler { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeScheduler") - } - var r0 jobs.Scheduler if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok { r0 = rf() @@ -40,10 +36,6 @@ func (_m *MessageExportJobInterface) MakeScheduler() jobs.Scheduler { func (_m *MessageExportJobInterface) MakeWorker() model.Worker { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for MakeWorker") - } - var r0 model.Worker if rf, ok := ret.Get(0).(func() model.Worker); ok { r0 = rf() @@ -56,12 +48,13 @@ func (_m *MessageExportJobInterface) MakeWorker() model.Worker { return r0 } -// NewMessageExportJobInterface creates a new instance of MessageExportJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMessageExportJobInterface(t interface { +type mockConstructorTestingTNewMessageExportJobInterface interface { mock.TestingT Cleanup(func()) -}) *MessageExportJobInterface { +} + +// NewMessageExportJobInterface creates a new instance of MessageExportJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMessageExportJobInterface(t mockConstructorTestingTNewMessageExportJobInterface) *MessageExportJobInterface { mock := &MessageExportJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MetricsInterface.go b/server/einterfaces/mocks/MetricsInterface.go index 20120c7cb9..7c50f2f03e 100644 --- a/server/einterfaces/mocks/MetricsInterface.go +++ b/server/einterfaces/mocks/MetricsInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -47,10 +47,6 @@ func (_m *MetricsInterface) DecrementWebSocketBroadcastUsersRegistered(hub strin func (_m *MetricsInterface) GetLoggerMetricsCollector() logr.MetricsCollector { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetLoggerMetricsCollector") - } - var r0 logr.MetricsCollector if rf, ok := ret.Get(0).(func() logr.MetricsCollector); ok { r0 = rf() @@ -363,12 +359,13 @@ func (_m *MetricsInterface) UnregisterDBCollector(db *sql.DB, name string) { _m.Called(db, name) } -// NewMetricsInterface creates a new instance of MetricsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMetricsInterface(t interface { +type mockConstructorTestingTNewMetricsInterface interface { mock.TestingT Cleanup(func()) -}) *MetricsInterface { +} + +// NewMetricsInterface creates a new instance of MetricsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMetricsInterface(t mockConstructorTestingTNewMetricsInterface) *MetricsInterface { mock := &MetricsInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/NotificationInterface.go b/server/einterfaces/mocks/NotificationInterface.go index eabc8ec4eb..71498ec0d5 100644 --- a/server/einterfaces/mocks/NotificationInterface.go +++ b/server/einterfaces/mocks/NotificationInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type NotificationInterface struct { func (_m *NotificationInterface) CheckLicense() *model.AppError { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for CheckLicense") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func() *model.AppError); ok { r0 = rf() @@ -39,10 +35,6 @@ func (_m *NotificationInterface) CheckLicense() *model.AppError { func (_m *NotificationInterface) GetNotificationMessage(c request.CTX, ack *model.PushNotificationAck, userID string) (*model.PushNotification, *model.AppError) { ret := _m.Called(c, ack, userID) - if len(ret) == 0 { - panic("no return value specified for GetNotificationMessage") - } - var r0 *model.PushNotification var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.PushNotificationAck, string) (*model.PushNotification, *model.AppError)); ok { @@ -67,12 +59,13 @@ func (_m *NotificationInterface) GetNotificationMessage(c request.CTX, ack *mode return r0, r1 } -// NewNotificationInterface creates a new instance of NotificationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNotificationInterface(t interface { +type mockConstructorTestingTNewNotificationInterface interface { mock.TestingT Cleanup(func()) -}) *NotificationInterface { +} + +// NewNotificationInterface creates a new instance of NotificationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewNotificationInterface(t mockConstructorTestingTNewNotificationInterface) *NotificationInterface { mock := &NotificationInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/OAuthProvider.go b/server/einterfaces/mocks/OAuthProvider.go index 34fd90bd93..aa5a2db38d 100644 --- a/server/einterfaces/mocks/OAuthProvider.go +++ b/server/einterfaces/mocks/OAuthProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -22,10 +22,6 @@ type OAuthProvider struct { func (_m *OAuthProvider) GetSSOSettings(c request.CTX, config *model.Config, service string) (*model.SSOSettings, error) { ret := _m.Called(c, config, service) - if len(ret) == 0 { - panic("no return value specified for GetSSOSettings") - } - var r0 *model.SSOSettings var r1 error if rf, ok := ret.Get(0).(func(request.CTX, *model.Config, string) (*model.SSOSettings, error)); ok { @@ -52,10 +48,6 @@ func (_m *OAuthProvider) GetSSOSettings(c request.CTX, config *model.Config, ser func (_m *OAuthProvider) GetUserFromIdToken(c request.CTX, idToken string) (*model.User, error) { ret := _m.Called(c, idToken) - if len(ret) == 0 { - panic("no return value specified for GetUserFromIdToken") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.User, error)); ok { @@ -82,10 +74,6 @@ func (_m *OAuthProvider) GetUserFromIdToken(c request.CTX, idToken string) (*mod func (_m *OAuthProvider) GetUserFromJSON(c request.CTX, data io.Reader, tokenUser *model.User) (*model.User, error) { ret := _m.Called(c, data, tokenUser) - if len(ret) == 0 { - panic("no return value specified for GetUserFromJSON") - } - var r0 *model.User var r1 error if rf, ok := ret.Get(0).(func(request.CTX, io.Reader, *model.User) (*model.User, error)); ok { @@ -112,10 +100,6 @@ func (_m *OAuthProvider) GetUserFromJSON(c request.CTX, data io.Reader, tokenUse func (_m *OAuthProvider) IsSameUser(c request.CTX, dbUser *model.User, oAuthUser *model.User) bool { ret := _m.Called(c, dbUser, oAuthUser) - if len(ret) == 0 { - panic("no return value specified for IsSameUser") - } - var r0 bool if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.User) bool); ok { r0 = rf(c, dbUser, oAuthUser) @@ -126,12 +110,13 @@ func (_m *OAuthProvider) IsSameUser(c request.CTX, dbUser *model.User, oAuthUser return r0 } -// NewOAuthProvider creates a new instance of OAuthProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewOAuthProvider(t interface { +type mockConstructorTestingTNewOAuthProvider interface { mock.TestingT Cleanup(func()) -}) *OAuthProvider { +} + +// NewOAuthProvider creates a new instance of OAuthProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewOAuthProvider(t mockConstructorTestingTNewOAuthProvider) *OAuthProvider { mock := &OAuthProvider{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go b/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go index 8989b89381..695725593d 100644 --- a/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go +++ b/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type OutgoingOAuthConnectionInterface struct { func (_m *OutgoingOAuthConnectionInterface) DeleteConnection(rctx request.CTX, id string) *model.AppError { ret := _m.Called(rctx, id) - if len(ret) == 0 { - panic("no return value specified for DeleteConnection") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, id) @@ -39,10 +35,6 @@ func (_m *OutgoingOAuthConnectionInterface) DeleteConnection(rctx request.CTX, i func (_m *OutgoingOAuthConnectionInterface) GetConnection(rctx request.CTX, id string) (*model.OutgoingOAuthConnection, *model.AppError) { ret := _m.Called(rctx, id) - if len(ret) == 0 { - panic("no return value specified for GetConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.OutgoingOAuthConnection, *model.AppError)); ok { @@ -71,10 +63,6 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnection(rctx request.CTX, id s func (_m *OutgoingOAuthConnectionInterface) GetConnectionForAudience(rctx request.CTX, url string) (*model.OutgoingOAuthConnection, *model.AppError) { ret := _m.Called(rctx, url) - if len(ret) == 0 { - panic("no return value specified for GetConnectionForAudience") - } - var r0 *model.OutgoingOAuthConnection var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.OutgoingOAuthConnection, *model.AppError)); ok { @@ -103,10 +91,6 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnectionForAudience(rctx reques func (_m *OutgoingOAuthConnectionInterface) GetConnections(rctx request.CTX, filters model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, *model.AppError) { ret := _m.Called(rctx, filters) - if len(ret) == 0 { - panic("no return value specified for GetConnections") - } - var r0 []*model.OutgoingOAuthConnection var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, *model.AppError)); ok { @@ -135,10 +119,6 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnections(rctx request.CTX, fil func (_m *OutgoingOAuthConnectionInterface) RetrieveTokenForConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnectionToken, *model.AppError) { ret := _m.Called(rctx, conn) - if len(ret) == 0 { - panic("no return value specified for RetrieveTokenForConnection") - } - var r0 *model.OutgoingOAuthConnectionToken var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnectionToken, *model.AppError)); ok { @@ -177,10 +157,6 @@ func (_m *OutgoingOAuthConnectionInterface) SanitizeConnections(conns []*model.O func (_m *OutgoingOAuthConnectionInterface) SaveConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError) { ret := _m.Called(rctx, conn) - if len(ret) == 0 { - panic("no return value specified for SaveConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError)); ok { @@ -209,10 +185,6 @@ func (_m *OutgoingOAuthConnectionInterface) SaveConnection(rctx request.CTX, con func (_m *OutgoingOAuthConnectionInterface) UpdateConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError) { ret := _m.Called(rctx, conn) - if len(ret) == 0 { - panic("no return value specified for UpdateConnection") - } - var r0 *model.OutgoingOAuthConnection var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError)); ok { @@ -237,12 +209,13 @@ func (_m *OutgoingOAuthConnectionInterface) UpdateConnection(rctx request.CTX, c return r0, r1 } -// NewOutgoingOAuthConnectionInterface creates a new instance of OutgoingOAuthConnectionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewOutgoingOAuthConnectionInterface(t interface { +type mockConstructorTestingTNewOutgoingOAuthConnectionInterface interface { mock.TestingT Cleanup(func()) -}) *OutgoingOAuthConnectionInterface { +} + +// NewOutgoingOAuthConnectionInterface creates a new instance of OutgoingOAuthConnectionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewOutgoingOAuthConnectionInterface(t mockConstructorTestingTNewOutgoingOAuthConnectionInterface) *OutgoingOAuthConnectionInterface { mock := &OutgoingOAuthConnectionInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/SamlInterface.go b/server/einterfaces/mocks/SamlInterface.go index 7fee33a61d..10e8130cd0 100644 --- a/server/einterfaces/mocks/SamlInterface.go +++ b/server/einterfaces/mocks/SamlInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,10 +19,6 @@ type SamlInterface struct { func (_m *SamlInterface) BuildRequest(c request.CTX, relayState string) (*model.SamlAuthRequest, *model.AppError) { ret := _m.Called(c, relayState) - if len(ret) == 0 { - panic("no return value specified for BuildRequest") - } - var r0 *model.SamlAuthRequest var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.SamlAuthRequest, *model.AppError)); ok { @@ -51,10 +47,6 @@ func (_m *SamlInterface) BuildRequest(c request.CTX, relayState string) (*model. func (_m *SamlInterface) CheckProviderAttributes(c request.CTX, SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string { ret := _m.Called(c, SS, ouser, patch) - if len(ret) == 0 { - panic("no return value specified for CheckProviderAttributes") - } - var r0 string if rf, ok := ret.Get(0).(func(request.CTX, *model.SamlSettings, *model.User, *model.UserPatch) string); ok { r0 = rf(c, SS, ouser, patch) @@ -69,10 +61,6 @@ func (_m *SamlInterface) CheckProviderAttributes(c request.CTX, SS *model.SamlSe func (_m *SamlInterface) ConfigureSP(c request.CTX) error { ret := _m.Called(c) - if len(ret) == 0 { - panic("no return value specified for ConfigureSP") - } - var r0 error if rf, ok := ret.Get(0).(func(request.CTX) error); ok { r0 = rf(c) @@ -87,10 +75,6 @@ func (_m *SamlInterface) ConfigureSP(c request.CTX) error { func (_m *SamlInterface) DoLogin(c request.CTX, encodedXML string, relayState map[string]string) (*model.User, *model.AppError) { ret := _m.Called(c, encodedXML, relayState) - if len(ret) == 0 { - panic("no return value specified for DoLogin") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string) (*model.User, *model.AppError)); ok { @@ -119,10 +103,6 @@ func (_m *SamlInterface) DoLogin(c request.CTX, encodedXML string, relayState ma func (_m *SamlInterface) GetMetadata(c request.CTX) (string, *model.AppError) { ret := _m.Called(c) - if len(ret) == 0 { - panic("no return value specified for GetMetadata") - } - var r0 string var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) (string, *model.AppError)); ok { @@ -145,12 +125,13 @@ func (_m *SamlInterface) GetMetadata(c request.CTX) (string, *model.AppError) { return r0, r1 } -// NewSamlInterface creates a new instance of SamlInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSamlInterface(t interface { +type mockConstructorTestingTNewSamlInterface interface { mock.TestingT Cleanup(func()) -}) *SamlInterface { +} + +// NewSamlInterface creates a new instance of SamlInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSamlInterface(t mockConstructorTestingTNewSamlInterface) *SamlInterface { mock := &SamlInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/Scheduler.go b/server/einterfaces/mocks/Scheduler.go index 7e452769e4..ad67a09162 100644 --- a/server/einterfaces/mocks/Scheduler.go +++ b/server/einterfaces/mocks/Scheduler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -21,10 +21,6 @@ type Scheduler struct { func (_m *Scheduler) Enabled(cfg *model.Config) bool { ret := _m.Called(cfg) - if len(ret) == 0 { - panic("no return value specified for Enabled") - } - var r0 bool if rf, ok := ret.Get(0).(func(*model.Config) bool); ok { r0 = rf(cfg) @@ -39,10 +35,6 @@ func (_m *Scheduler) Enabled(cfg *model.Config) bool { func (_m *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJobs bool, lastSuccessfulJob *model.Job) *time.Time { ret := _m.Called(cfg, now, pendingJobs, lastSuccessfulJob) - if len(ret) == 0 { - panic("no return value specified for NextScheduleTime") - } - var r0 *time.Time if rf, ok := ret.Get(0).(func(*model.Config, time.Time, bool, *model.Job) *time.Time); ok { r0 = rf(cfg, now, pendingJobs, lastSuccessfulJob) @@ -59,10 +51,6 @@ func (_m *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJ func (_m *Scheduler) ScheduleJob(c request.CTX, cfg *model.Config, pendingJobs bool, lastSuccessfulJob *model.Job) (*model.Job, *model.AppError) { ret := _m.Called(c, cfg, pendingJobs, lastSuccessfulJob) - if len(ret) == 0 { - panic("no return value specified for ScheduleJob") - } - var r0 *model.Job var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Config, bool, *model.Job) (*model.Job, *model.AppError)); ok { @@ -87,12 +75,13 @@ func (_m *Scheduler) ScheduleJob(c request.CTX, cfg *model.Config, pendingJobs b return r0, r1 } -// NewScheduler creates a new instance of Scheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewScheduler(t interface { +type mockConstructorTestingTNewScheduler interface { mock.TestingT Cleanup(func()) -}) *Scheduler { +} + +// NewScheduler creates a new instance of Scheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewScheduler(t mockConstructorTestingTNewScheduler) *Scheduler { mock := &Scheduler{} mock.Mock.Test(t) diff --git a/server/platform/services/searchengine/mocks/SearchEngineInterface.go b/server/platform/services/searchengine/mocks/SearchEngineInterface.go index 14f0afa539..a10d933f11 100644 --- a/server/platform/services/searchengine/mocks/SearchEngineInterface.go +++ b/server/platform/services/searchengine/mocks/SearchEngineInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make searchengine-mocks`. @@ -21,10 +21,6 @@ type SearchEngineInterface struct { func (_m *SearchEngineInterface) DataRetentionDeleteIndexes(rctx request.CTX, cutoff time.Time) *model.AppError { ret := _m.Called(rctx, cutoff) - if len(ret) == 0 { - panic("no return value specified for DataRetentionDeleteIndexes") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, time.Time) *model.AppError); ok { r0 = rf(rctx, cutoff) @@ -41,10 +37,6 @@ func (_m *SearchEngineInterface) DataRetentionDeleteIndexes(rctx request.CTX, cu func (_m *SearchEngineInterface) DeleteChannel(channel *model.Channel) *model.AppError { ret := _m.Called(channel) - if len(ret) == 0 { - panic("no return value specified for DeleteChannel") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok { r0 = rf(channel) @@ -61,10 +53,6 @@ func (_m *SearchEngineInterface) DeleteChannel(channel *model.Channel) *model.Ap func (_m *SearchEngineInterface) DeleteChannelPosts(rctx request.CTX, channelID string) *model.AppError { ret := _m.Called(rctx, channelID) - if len(ret) == 0 { - panic("no return value specified for DeleteChannelPosts") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, channelID) @@ -81,10 +69,6 @@ func (_m *SearchEngineInterface) DeleteChannelPosts(rctx request.CTX, channelID func (_m *SearchEngineInterface) DeleteFile(fileID string) *model.AppError { ret := _m.Called(fileID) - if len(ret) == 0 { - panic("no return value specified for DeleteFile") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(fileID) @@ -101,10 +85,6 @@ func (_m *SearchEngineInterface) DeleteFile(fileID string) *model.AppError { func (_m *SearchEngineInterface) DeleteFilesBatch(rctx request.CTX, endTime int64, limit int64) *model.AppError { ret := _m.Called(rctx, endTime, limit) - if len(ret) == 0 { - panic("no return value specified for DeleteFilesBatch") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, int64, int64) *model.AppError); ok { r0 = rf(rctx, endTime, limit) @@ -121,10 +101,6 @@ func (_m *SearchEngineInterface) DeleteFilesBatch(rctx request.CTX, endTime int6 func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError { ret := _m.Called(post) - if len(ret) == 0 { - panic("no return value specified for DeletePost") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Post) *model.AppError); ok { r0 = rf(post) @@ -141,10 +117,6 @@ func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError { func (_m *SearchEngineInterface) DeletePostFiles(rctx request.CTX, postID string) *model.AppError { ret := _m.Called(rctx, postID) - if len(ret) == 0 { - panic("no return value specified for DeletePostFiles") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, postID) @@ -161,10 +133,6 @@ func (_m *SearchEngineInterface) DeletePostFiles(rctx request.CTX, postID string func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError { ret := _m.Called(user) - if len(ret) == 0 { - panic("no return value specified for DeleteUser") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.User) *model.AppError); ok { r0 = rf(user) @@ -181,10 +149,6 @@ func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError { func (_m *SearchEngineInterface) DeleteUserFiles(rctx request.CTX, userID string) *model.AppError { ret := _m.Called(rctx, userID) - if len(ret) == 0 { - panic("no return value specified for DeleteUserFiles") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, userID) @@ -201,10 +165,6 @@ func (_m *SearchEngineInterface) DeleteUserFiles(rctx request.CTX, userID string func (_m *SearchEngineInterface) DeleteUserPosts(rctx request.CTX, userID string) *model.AppError { ret := _m.Called(rctx, userID) - if len(ret) == 0 { - panic("no return value specified for DeleteUserPosts") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, userID) @@ -221,10 +181,6 @@ func (_m *SearchEngineInterface) DeleteUserPosts(rctx request.CTX, userID string func (_m *SearchEngineInterface) GetFullVersion() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetFullVersion") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -239,10 +195,6 @@ func (_m *SearchEngineInterface) GetFullVersion() string { func (_m *SearchEngineInterface) GetName() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetName") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -257,10 +209,6 @@ func (_m *SearchEngineInterface) GetName() string { func (_m *SearchEngineInterface) GetPlugins() []string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPlugins") - } - var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -277,10 +225,6 @@ func (_m *SearchEngineInterface) GetPlugins() []string { func (_m *SearchEngineInterface) GetVersion() int { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetVersion") - } - var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -295,10 +239,6 @@ func (_m *SearchEngineInterface) GetVersion() int { func (_m *SearchEngineInterface) IndexChannel(rctx request.CTX, channel *model.Channel, userIDs []string, teamMemberIDs []string) *model.AppError { ret := _m.Called(rctx, channel, userIDs, teamMemberIDs) - if len(ret) == 0 { - panic("no return value specified for IndexChannel") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []string, []string) *model.AppError); ok { r0 = rf(rctx, channel, userIDs, teamMemberIDs) @@ -315,10 +255,6 @@ func (_m *SearchEngineInterface) IndexChannel(rctx request.CTX, channel *model.C func (_m *SearchEngineInterface) IndexFile(file *model.FileInfo, channelId string) *model.AppError { ret := _m.Called(file, channelId) - if len(ret) == 0 { - panic("no return value specified for IndexFile") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.FileInfo, string) *model.AppError); ok { r0 = rf(file, channelId) @@ -335,10 +271,6 @@ func (_m *SearchEngineInterface) IndexFile(file *model.FileInfo, channelId strin func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *model.AppError { ret := _m.Called(post, teamId) - if len(ret) == 0 { - panic("no return value specified for IndexPost") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Post, string) *model.AppError); ok { r0 = rf(post, teamId) @@ -355,10 +287,6 @@ func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *mod func (_m *SearchEngineInterface) IndexUser(rctx request.CTX, user *model.User, teamsIds []string, channelsIds []string) *model.AppError { ret := _m.Called(rctx, user, teamsIds, channelsIds) - if len(ret) == 0 { - panic("no return value specified for IndexUser") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.User, []string, []string) *model.AppError); ok { r0 = rf(rctx, user, teamsIds, channelsIds) @@ -375,10 +303,6 @@ func (_m *SearchEngineInterface) IndexUser(rctx request.CTX, user *model.User, t func (_m *SearchEngineInterface) IsActive() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsActive") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -393,10 +317,6 @@ func (_m *SearchEngineInterface) IsActive() bool { func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsAutocompletionEnabled") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -411,10 +331,6 @@ func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool { func (_m *SearchEngineInterface) IsChannelsIndexVerified() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsChannelsIndexVerified") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -429,10 +345,6 @@ func (_m *SearchEngineInterface) IsChannelsIndexVerified() bool { func (_m *SearchEngineInterface) IsEnabled() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsEnabled") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -447,10 +359,6 @@ func (_m *SearchEngineInterface) IsEnabled() bool { func (_m *SearchEngineInterface) IsIndexingEnabled() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsIndexingEnabled") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -465,10 +373,6 @@ func (_m *SearchEngineInterface) IsIndexingEnabled() bool { func (_m *SearchEngineInterface) IsIndexingSync() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsIndexingSync") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -483,10 +387,6 @@ func (_m *SearchEngineInterface) IsIndexingSync() bool { func (_m *SearchEngineInterface) IsSearchEnabled() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsSearchEnabled") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -501,10 +401,6 @@ func (_m *SearchEngineInterface) IsSearchEnabled() bool { func (_m *SearchEngineInterface) PurgeIndexList(rctx request.CTX, indexes []string) *model.AppError { ret := _m.Called(rctx, indexes) - if len(ret) == 0 { - panic("no return value specified for PurgeIndexList") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, []string) *model.AppError); ok { r0 = rf(rctx, indexes) @@ -521,10 +417,6 @@ func (_m *SearchEngineInterface) PurgeIndexList(rctx request.CTX, indexes []stri func (_m *SearchEngineInterface) PurgeIndexes(rctx request.CTX) *model.AppError { ret := _m.Called(rctx) - if len(ret) == 0 { - panic("no return value specified for PurgeIndexes") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok { r0 = rf(rctx) @@ -541,10 +433,6 @@ func (_m *SearchEngineInterface) PurgeIndexes(rctx request.CTX) *model.AppError func (_m *SearchEngineInterface) RefreshIndexes(rctx request.CTX) *model.AppError { ret := _m.Called(rctx) - if len(ret) == 0 { - panic("no return value specified for RefreshIndexes") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok { r0 = rf(rctx) @@ -561,10 +449,6 @@ func (_m *SearchEngineInterface) RefreshIndexes(rctx request.CTX) *model.AppErro func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, term string, isGuest bool) ([]string, *model.AppError) { ret := _m.Called(teamId, userID, term, isGuest) - if len(ret) == 0 { - panic("no return value specified for SearchChannels") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string, bool) ([]string, *model.AppError)); ok { @@ -593,10 +477,6 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, *model.AppError) { ret := _m.Called(channels, searchParams, page, perPage) - if len(ret) == 0 { - panic("no return value specified for SearchFiles") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, *model.AppError)); ok { @@ -625,10 +505,6 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, model.PostSearchMatches, *model.AppError) { ret := _m.Called(channels, searchParams, page, perPage) - if len(ret) == 0 { - panic("no return value specified for SearchPosts") - } - var r0 []string var r1 model.PostSearchMatches var r2 *model.AppError @@ -666,10 +542,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) { ret := _m.Called(teamId, channelId, restrictedToChannels, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchUsersInChannel") - } - var r0 []string var r1 []string var r2 *model.AppError @@ -707,10 +579,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) { ret := _m.Called(teamId, restrictedToChannels, term, options) - if len(ret) == 0 { - panic("no return value specified for SearchUsersInTeam") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) ([]string, *model.AppError)); ok { @@ -739,10 +607,6 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh func (_m *SearchEngineInterface) Start() *model.AppError { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Start") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func() *model.AppError); ok { r0 = rf() @@ -759,10 +623,6 @@ func (_m *SearchEngineInterface) Start() *model.AppError { func (_m *SearchEngineInterface) Stop() *model.AppError { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Stop") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func() *model.AppError); ok { r0 = rf() @@ -779,10 +639,6 @@ func (_m *SearchEngineInterface) Stop() *model.AppError { func (_m *SearchEngineInterface) TestConfig(rctx request.CTX, cfg *model.Config) *model.AppError { ret := _m.Called(rctx, cfg) - if len(ret) == 0 { - panic("no return value specified for TestConfig") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Config) *model.AppError); ok { r0 = rf(rctx, cfg) @@ -800,12 +656,13 @@ func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) { _m.Called(cfg) } -// NewSearchEngineInterface creates a new instance of SearchEngineInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSearchEngineInterface(t interface { +type mockConstructorTestingTNewSearchEngineInterface interface { mock.TestingT Cleanup(func()) -}) *SearchEngineInterface { +} + +// NewSearchEngineInterface creates a new instance of SearchEngineInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSearchEngineInterface(t mockConstructorTestingTNewSearchEngineInterface) *SearchEngineInterface { mock := &SearchEngineInterface{} mock.Mock.Test(t) diff --git a/server/platform/services/sharedchannel/mock_AppIface_test.go b/server/platform/services/sharedchannel/mock_AppIface_test.go index 8144909328..0af65db307 100644 --- a/server/platform/services/sharedchannel/mock_AppIface_test.go +++ b/server/platform/services/sharedchannel/mock_AppIface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make sharedchannel-mocks`. @@ -22,10 +22,6 @@ type MockAppIface struct { func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError) { ret := _m.Called(c, user, channel, skipTeamMemberIntegrityCheck) - if len(ret) == 0 { - panic("no return value specified for AddUserToChannel") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) (*model.ChannelMember, *model.AppError)); ok { @@ -54,10 +50,6 @@ func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channe func (_m *MockAppIface) AddUserToTeamByTeamId(c request.CTX, teamId string, user *model.User) *model.AppError { ret := _m.Called(c, teamId, user) - if len(ret) == 0 { - panic("no return value specified for AddUserToTeamByTeamId") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, *model.User) *model.AppError); ok { r0 = rf(c, teamId, user) @@ -74,10 +66,6 @@ func (_m *MockAppIface) AddUserToTeamByTeamId(c request.CTX, teamId string, user func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Channel, userId string) (*model.Channel, *model.AppError) { ret := _m.Called(c, channel, userId) - if len(ret) == 0 { - panic("no return value specified for CreateChannelWithUser") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) (*model.Channel, *model.AppError)); ok { @@ -106,10 +94,6 @@ func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Chan func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *model.Channel, triggerWebhooks bool, setOnline bool) (*model.Post, *model.AppError) { ret := _m.Called(c, post, channel, triggerWebhooks, setOnline) - if len(ret) == 0 { - panic("no return value specified for CreatePost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, bool, bool) (*model.Post, *model.AppError)); ok { @@ -138,10 +122,6 @@ func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *mod func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSession) (*model.UploadSession, *model.AppError) { ret := _m.Called(c, us) - if len(ret) == 0 { - panic("no return value specified for CreateUploadSession") - } - var r0 *model.UploadSession var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) (*model.UploadSession, *model.AppError)); ok { @@ -170,10 +150,6 @@ func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSessi func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID string) (*model.Post, *model.AppError) { ret := _m.Called(c, postID, deleteByID) - if len(ret) == 0 { - panic("no return value specified for DeletePost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.Post, *model.AppError)); ok { @@ -202,10 +178,6 @@ func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID stri func (_m *MockAppIface) DeleteReactionForPost(c request.CTX, reaction *model.Reaction) *model.AppError { ret := _m.Called(c, reaction) - if len(ret) == 0 { - panic("no return value specified for DeleteReactionForPost") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) *model.AppError); ok { r0 = rf(c, reaction) @@ -222,10 +194,6 @@ func (_m *MockAppIface) DeleteReactionForPost(c request.CTX, reaction *model.Rea func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for FileReader") - } - var r0 filestore.ReadCloseSeeker var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, *model.AppError)); ok { @@ -261,10 +229,6 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) - if len(ret) == 0 { - panic("no return value specified for GetOrCreateDirectChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)); ok { @@ -293,10 +257,6 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) { ret := _m.Called(user) - if len(ret) == 0 { - panic("no return value specified for GetProfileImage") - } - var r0 []byte var r1 bool var r2 *model.AppError @@ -332,10 +292,6 @@ func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model. func (_m *MockAppIface) MentionsToTeamMembers(c request.CTX, message string, teamID string) model.UserMentionMap { ret := _m.Called(c, message, teamID) - if len(ret) == 0 { - panic("no return value specified for MentionsToTeamMembers") - } - var r0 model.UserMentionMap if rf, ok := ret.Get(0).(func(request.CTX, string, string) model.UserMentionMap); ok { r0 = rf(c, message, teamID) @@ -357,10 +313,6 @@ func (_m *MockAppIface) NotifySharedChannelUserUpdate(user *model.User) { func (_m *MockAppIface) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error { ret := _m.Called(fi, post, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsAttachmentSyncMsg") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.FileInfo, *model.Post, *model.RemoteCluster) error); ok { r0 = rf(fi, post, rc) @@ -375,10 +327,6 @@ func (_m *MockAppIface) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, po func (_m *MockAppIface) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error { ret := _m.Called(user, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsProfileImageSyncMsg") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.User, *model.RemoteCluster) error); ok { r0 = rf(user, rc) @@ -393,10 +341,6 @@ func (_m *MockAppIface) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc func (_m *MockAppIface) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error) { ret := _m.Called(msg, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsSyncMsg") - } - var r0 model.SyncResponse var r1 error if rf, ok := ret.Get(0).(func(*model.SyncMsg, *model.RemoteCluster) (model.SyncResponse, error)); ok { @@ -421,10 +365,6 @@ func (_m *MockAppIface) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.Re func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError) { ret := _m.Called(c, channel, channelModerationsPatch) - if len(ret) == 0 { - panic("no return value specified for PatchChannelModerationsForChannel") - } - var r0 []*model.ChannelModeration var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError)); ok { @@ -453,10 +393,6 @@ func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel func (_m *MockAppIface) PermanentDeleteChannel(c request.CTX, channel *model.Channel) *model.AppError { ret := _m.Called(c, channel) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteChannel") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel) *model.AppError); ok { r0 = rf(c, channel) @@ -478,10 +414,6 @@ func (_m *MockAppIface) Publish(message *model.WebSocketEvent) { func (_m *MockAppIface) SaveReactionForPost(c request.CTX, reaction *model.Reaction) (*model.Reaction, *model.AppError) { ret := _m.Called(c, reaction) - if len(ret) == 0 { - panic("no return value specified for SaveReactionForPost") - } - var r0 *model.Reaction var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) (*model.Reaction, *model.AppError)); ok { @@ -510,10 +442,6 @@ func (_m *MockAppIface) SaveReactionForPost(c request.CTX, reaction *model.React func (_m *MockAppIface) SendEphemeralPost(c request.CTX, userId string, post *model.Post) *model.Post { ret := _m.Called(c, userId, post) - if len(ret) == 0 { - panic("no return value specified for SendEphemeralPost") - } - var r0 *model.Post if rf, ok := ret.Get(0).(func(request.CTX, string, *model.Post) *model.Post); ok { r0 = rf(c, userId, post) @@ -530,10 +458,6 @@ func (_m *MockAppIface) SendEphemeralPost(c request.CTX, userId string, post *mo func (_m *MockAppIface) UpdatePost(c request.CTX, post *model.Post, safeUpdate bool) (*model.Post, *model.AppError) { ret := _m.Called(c, post, safeUpdate) - if len(ret) == 0 { - panic("no return value specified for UpdatePost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, bool) (*model.Post, *model.AppError)); ok { @@ -558,12 +482,13 @@ func (_m *MockAppIface) UpdatePost(c request.CTX, post *model.Post, safeUpdate b return r0, r1 } -// NewMockAppIface creates a new instance of MockAppIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAppIface(t interface { +type mockConstructorTestingTNewMockAppIface interface { mock.TestingT Cleanup(func()) -}) *MockAppIface { +} + +// NewMockAppIface creates a new instance of MockAppIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockAppIface(t mockConstructorTestingTNewMockAppIface) *MockAppIface { mock := &MockAppIface{} mock.Mock.Test(t) diff --git a/server/platform/services/sharedchannel/mock_ServerIface_test.go b/server/platform/services/sharedchannel/mock_ServerIface_test.go index a623d97cbc..5de1ede5a9 100644 --- a/server/platform/services/sharedchannel/mock_ServerIface_test.go +++ b/server/platform/services/sharedchannel/mock_ServerIface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make sharedchannel-mocks`. @@ -26,10 +26,6 @@ type MockServerIface struct { func (_m *MockServerIface) AddClusterLeaderChangedListener(listener func()) string { ret := _m.Called(listener) - if len(ret) == 0 { - panic("no return value specified for AddClusterLeaderChangedListener") - } - var r0 string if rf, ok := ret.Get(0).(func(func()) string); ok { r0 = rf(listener) @@ -44,10 +40,6 @@ func (_m *MockServerIface) AddClusterLeaderChangedListener(listener func()) stri func (_m *MockServerIface) Config() *model.Config { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Config") - } - var r0 *model.Config if rf, ok := ret.Get(0).(func() *model.Config); ok { r0 = rf() @@ -64,10 +56,6 @@ func (_m *MockServerIface) Config() *model.Config { func (_m *MockServerIface) GetMetrics() einterfaces.MetricsInterface { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetMetrics") - } - var r0 einterfaces.MetricsInterface if rf, ok := ret.Get(0).(func() einterfaces.MetricsInterface); ok { r0 = rf() @@ -84,10 +72,6 @@ func (_m *MockServerIface) GetMetrics() einterfaces.MetricsInterface { func (_m *MockServerIface) GetRemoteClusterService() remotecluster.RemoteClusterServiceIFace { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetRemoteClusterService") - } - var r0 remotecluster.RemoteClusterServiceIFace if rf, ok := ret.Get(0).(func() remotecluster.RemoteClusterServiceIFace); ok { r0 = rf() @@ -104,10 +88,6 @@ func (_m *MockServerIface) GetRemoteClusterService() remotecluster.RemoteCluster func (_m *MockServerIface) GetStore() store.Store { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetStore") - } - var r0 store.Store if rf, ok := ret.Get(0).(func() store.Store); ok { r0 = rf() @@ -124,10 +104,6 @@ func (_m *MockServerIface) GetStore() store.Store { func (_m *MockServerIface) IsLeader() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsLeader") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -142,10 +118,6 @@ func (_m *MockServerIface) IsLeader() bool { func (_m *MockServerIface) Log() *mlog.Logger { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Log") - } - var r0 *mlog.Logger if rf, ok := ret.Get(0).(func() *mlog.Logger); ok { r0 = rf() @@ -163,12 +135,13 @@ func (_m *MockServerIface) RemoveClusterLeaderChangedListener(id string) { _m.Called(id) } -// NewMockServerIface creates a new instance of MockServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServerIface(t interface { +type mockConstructorTestingTNewMockServerIface interface { mock.TestingT Cleanup(func()) -}) *MockServerIface { +} + +// NewMockServerIface creates a new instance of MockServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockServerIface(t mockConstructorTestingTNewMockServerIface) *MockServerIface { mock := &MockServerIface{} mock.Mock.Test(t) diff --git a/server/platform/services/telemetry/mocks/ServerIface.go b/server/platform/services/telemetry/mocks/ServerIface.go index 569c01a7d2..c2185f8fbd 100644 --- a/server/platform/services/telemetry/mocks/ServerIface.go +++ b/server/platform/services/telemetry/mocks/ServerIface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make telemetry-mocks`. @@ -24,10 +24,6 @@ type ServerIface struct { func (_m *ServerIface) Config() *model.Config { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Config") - } - var r0 *model.Config if rf, ok := ret.Get(0).(func() *model.Config); ok { r0 = rf() @@ -44,10 +40,6 @@ func (_m *ServerIface) Config() *model.Config { func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPluginsEnvironment") - } - var r0 *plugin.Environment if rf, ok := ret.Get(0).(func() *plugin.Environment); ok { r0 = rf() @@ -64,10 +56,6 @@ func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment { func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Role, *model.AppError) { ret := _m.Called(_a0, _a1) - if len(ret) == 0 { - panic("no return value specified for GetRoleByName") - } - var r0 *model.Role var r1 *model.AppError if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, *model.AppError)); ok { @@ -96,10 +84,6 @@ func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Ro func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme, *model.AppError) { ret := _m.Called(_a0, _a1, _a2) - if len(ret) == 0 { - panic("no return value specified for GetSchemes") - } - var r0 []*model.Scheme var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, *model.AppError)); ok { @@ -128,10 +112,6 @@ func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme func (_m *ServerIface) HTTPService() httpservice.HTTPService { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for HTTPService") - } - var r0 httpservice.HTTPService if rf, ok := ret.Get(0).(func() httpservice.HTTPService); ok { r0 = rf() @@ -148,10 +128,6 @@ func (_m *ServerIface) HTTPService() httpservice.HTTPService { func (_m *ServerIface) IsLeader() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsLeader") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -166,10 +142,6 @@ func (_m *ServerIface) IsLeader() bool { func (_m *ServerIface) License() *model.License { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for License") - } - var r0 *model.License if rf, ok := ret.Get(0).(func() *model.License); ok { r0 = rf() @@ -182,12 +154,13 @@ func (_m *ServerIface) License() *model.License { return r0 } -// NewServerIface creates a new instance of ServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewServerIface(t interface { +type mockConstructorTestingTNewServerIface interface { mock.TestingT Cleanup(func()) -}) *ServerIface { +} + +// NewServerIface creates a new instance of ServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewServerIface(t mockConstructorTestingTNewServerIface) *ServerIface { mock := &ServerIface{} mock.Mock.Test(t) diff --git a/server/platform/shared/filestore/mocks/FileBackend.go b/server/platform/shared/filestore/mocks/FileBackend.go index dd294916e7..8d81a03d91 100644 --- a/server/platform/shared/filestore/mocks/FileBackend.go +++ b/server/platform/shared/filestore/mocks/FileBackend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -23,10 +23,6 @@ type FileBackend struct { func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) { ret := _m.Called(fr, path) - if len(ret) == 0 { - panic("no return value specified for AppendFile") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok { @@ -51,10 +47,6 @@ func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) { func (_m *FileBackend) CopyFile(oldPath string, newPath string) error { ret := _m.Called(oldPath, newPath) - if len(ret) == 0 { - panic("no return value specified for CopyFile") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(oldPath, newPath) @@ -69,10 +61,6 @@ func (_m *FileBackend) CopyFile(oldPath string, newPath string) error { func (_m *FileBackend) DriverName() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for DriverName") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -87,10 +75,6 @@ func (_m *FileBackend) DriverName() string { func (_m *FileBackend) FileExists(path string) (bool, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for FileExists") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -115,10 +99,6 @@ func (_m *FileBackend) FileExists(path string) (bool, error) { func (_m *FileBackend) FileModTime(path string) (time.Time, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for FileModTime") - } - var r0 time.Time var r1 error if rf, ok := ret.Get(0).(func(string) (time.Time, error)); ok { @@ -143,10 +123,6 @@ func (_m *FileBackend) FileModTime(path string) (time.Time, error) { func (_m *FileBackend) FileSize(path string) (int64, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for FileSize") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string) (int64, error)); ok { @@ -171,10 +147,6 @@ func (_m *FileBackend) FileSize(path string) (int64, error) { func (_m *FileBackend) ListDirectory(path string) ([]string, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for ListDirectory") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -201,10 +173,6 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) { func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for ListDirectoryRecursively") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -231,10 +199,6 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) { func (_m *FileBackend) MoveFile(oldPath string, newPath string) error { ret := _m.Called(oldPath, newPath) - if len(ret) == 0 { - panic("no return value specified for MoveFile") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(oldPath, newPath) @@ -249,10 +213,6 @@ func (_m *FileBackend) MoveFile(oldPath string, newPath string) error { func (_m *FileBackend) ReadFile(path string) ([]byte, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for ReadFile") - } - var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok { @@ -279,10 +239,6 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) { func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for Reader") - } - var r0 filestore.ReadCloseSeeker var r1 error if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, error)); ok { @@ -309,10 +265,6 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) { func (_m *FileBackend) RemoveDirectory(path string) error { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for RemoveDirectory") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(path) @@ -327,10 +279,6 @@ func (_m *FileBackend) RemoveDirectory(path string) error { func (_m *FileBackend) RemoveFile(path string) error { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for RemoveFile") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(path) @@ -345,10 +293,6 @@ func (_m *FileBackend) RemoveFile(path string) error { func (_m *FileBackend) TestConnection() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for TestConnection") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -363,10 +307,6 @@ func (_m *FileBackend) TestConnection() error { func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) { ret := _m.Called(fr, path) - if len(ret) == 0 { - panic("no return value specified for WriteFile") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok { @@ -387,12 +327,13 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) { return r0, r1 } -// NewFileBackend creates a new instance of FileBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewFileBackend(t interface { +type mockConstructorTestingTNewFileBackend interface { mock.TestingT Cleanup(func()) -}) *FileBackend { +} + +// NewFileBackend creates a new instance of FileBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewFileBackend(t mockConstructorTestingTNewFileBackend) *FileBackend { mock := &FileBackend{} mock.Mock.Test(t) diff --git a/server/platform/shared/filestore/mocks/FileBackendWithLinkGenerator.go b/server/platform/shared/filestore/mocks/FileBackendWithLinkGenerator.go index 68f19e96fe..c2e4bdce7c 100644 --- a/server/platform/shared/filestore/mocks/FileBackendWithLinkGenerator.go +++ b/server/platform/shared/filestore/mocks/FileBackendWithLinkGenerator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -19,10 +19,6 @@ type FileBackendWithLinkGenerator struct { func (_m *FileBackendWithLinkGenerator) GeneratePublicLink(path string) (string, time.Duration, error) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for GeneratePublicLink") - } - var r0 string var r1 time.Duration var r2 error @@ -50,12 +46,13 @@ func (_m *FileBackendWithLinkGenerator) GeneratePublicLink(path string) (string, return r0, r1, r2 } -// NewFileBackendWithLinkGenerator creates a new instance of FileBackendWithLinkGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewFileBackendWithLinkGenerator(t interface { +type mockConstructorTestingTNewFileBackendWithLinkGenerator interface { mock.TestingT Cleanup(func()) -}) *FileBackendWithLinkGenerator { +} + +// NewFileBackendWithLinkGenerator creates a new instance of FileBackendWithLinkGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewFileBackendWithLinkGenerator(t mockConstructorTestingTNewFileBackendWithLinkGenerator) *FileBackendWithLinkGenerator { mock := &FileBackendWithLinkGenerator{} mock.Mock.Test(t) diff --git a/server/platform/shared/filestore/mocks/ReadCloseSeeker.go b/server/platform/shared/filestore/mocks/ReadCloseSeeker.go index 1860204fdd..42ace6c2bf 100644 --- a/server/platform/shared/filestore/mocks/ReadCloseSeeker.go +++ b/server/platform/shared/filestore/mocks/ReadCloseSeeker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -15,10 +15,6 @@ type ReadCloseSeeker struct { func (_m *ReadCloseSeeker) Close() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Close") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -33,10 +29,6 @@ func (_m *ReadCloseSeeker) Close() error { func (_m *ReadCloseSeeker) Read(p []byte) (int, error) { ret := _m.Called(p) - if len(ret) == 0 { - panic("no return value specified for Read") - } - var r0 int var r1 error if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { @@ -61,10 +53,6 @@ func (_m *ReadCloseSeeker) Read(p []byte) (int, error) { func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) { ret := _m.Called(offset, whence) - if len(ret) == 0 { - panic("no return value specified for Seek") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int) (int64, error)); ok { @@ -85,12 +73,13 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) { return r0, r1 } -// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadCloseSeeker(t interface { +type mockConstructorTestingTNewReadCloseSeeker interface { mock.TestingT Cleanup(func()) -}) *ReadCloseSeeker { +} + +// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewReadCloseSeeker(t mockConstructorTestingTNewReadCloseSeeker) *ReadCloseSeeker { mock := &ReadCloseSeeker{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/api.go b/server/public/plugin/plugintest/api.go index 635aed9966..805adefe8a 100644 --- a/server/public/plugin/plugintest/api.go +++ b/server/public/plugin/plugintest/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -22,10 +22,6 @@ type API struct { func (_m *API) AddChannelMember(channelId string, userID string) (*model.ChannelMember, *model.AppError) { ret := _m.Called(channelId, userID) - if len(ret) == 0 { - panic("no return value specified for AddChannelMember") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelMember, *model.AppError)); ok { @@ -54,10 +50,6 @@ func (_m *API) AddChannelMember(channelId string, userID string) (*model.Channel func (_m *API) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) { ret := _m.Called(reaction) - if len(ret) == 0 { - panic("no return value specified for AddReaction") - } - var r0 *model.Reaction var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, *model.AppError)); ok { @@ -86,10 +78,6 @@ func (_m *API) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.Ap func (_m *API) AddUserToChannel(channelId string, userID string, asUserId string) (*model.ChannelMember, *model.AppError) { ret := _m.Called(channelId, userID, asUserId) - if len(ret) == 0 { - panic("no return value specified for AddUserToChannel") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) (*model.ChannelMember, *model.AppError)); ok { @@ -118,10 +106,6 @@ func (_m *API) AddUserToChannel(channelId string, userID string, asUserId string func (_m *API) CopyFileInfos(userID string, fileIds []string) ([]string, *model.AppError) { ret := _m.Called(userID, fileIds) - if len(ret) == 0 { - panic("no return value specified for CopyFileInfos") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) ([]string, *model.AppError)); ok { @@ -150,10 +134,6 @@ func (_m *API) CopyFileInfos(userID string, fileIds []string) ([]string, *model. func (_m *API) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) { ret := _m.Called(bot) - if len(ret) == 0 { - panic("no return value specified for CreateBot") - } - var r0 *model.Bot var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, *model.AppError)); ok { @@ -182,10 +162,6 @@ func (_m *API) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) { func (_m *API) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { ret := _m.Called(channel) - if len(ret) == 0 { - panic("no return value specified for CreateChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Channel) (*model.Channel, *model.AppError)); ok { @@ -214,10 +190,6 @@ func (_m *API) CreateChannel(channel *model.Channel) (*model.Channel, *model.App func (_m *API) CreateChannelSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) { ret := _m.Called(userID, teamID, newCategory) - if len(ret) == 0 { - panic("no return value specified for CreateChannelSidebarCategory") - } - var r0 *model.SidebarCategoryWithChannels var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)); ok { @@ -246,10 +218,6 @@ func (_m *API) CreateChannelSidebarCategory(userID string, teamID string, newCat func (_m *API) CreateCommand(cmd *model.Command) (*model.Command, error) { ret := _m.Called(cmd) - if len(ret) == 0 { - panic("no return value specified for CreateCommand") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok { @@ -276,10 +244,6 @@ func (_m *API) CreateCommand(cmd *model.Command) (*model.Command, error) { func (_m *API) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) { ret := _m.Called(app) - if len(ret) == 0 { - panic("no return value specified for CreateOAuthApp") - } - var r0 *model.OAuthApp var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)); ok { @@ -308,10 +272,6 @@ func (_m *API) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppE func (_m *API) CreatePost(post *model.Post) (*model.Post, *model.AppError) { ret := _m.Called(post) - if len(ret) == 0 { - panic("no return value specified for CreatePost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok { @@ -340,10 +300,6 @@ func (_m *API) CreatePost(post *model.Post) (*model.Post, *model.AppError) { func (_m *API) CreateSession(session *model.Session) (*model.Session, *model.AppError) { ret := _m.Called(session) - if len(ret) == 0 { - panic("no return value specified for CreateSession") - } - var r0 *model.Session var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Session) (*model.Session, *model.AppError)); ok { @@ -372,10 +328,6 @@ func (_m *API) CreateSession(session *model.Session) (*model.Session, *model.App func (_m *API) CreateTeam(team *model.Team) (*model.Team, *model.AppError) { ret := _m.Called(team) - if len(ret) == 0 { - panic("no return value specified for CreateTeam") - } - var r0 *model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, *model.AppError)); ok { @@ -404,10 +356,6 @@ func (_m *API) CreateTeam(team *model.Team) (*model.Team, *model.AppError) { func (_m *API) CreateTeamMember(teamID string, userID string) (*model.TeamMember, *model.AppError) { ret := _m.Called(teamID, userID) - if len(ret) == 0 { - panic("no return value specified for CreateTeamMember") - } - var r0 *model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.TeamMember, *model.AppError)); ok { @@ -436,10 +384,6 @@ func (_m *API) CreateTeamMember(teamID string, userID string) (*model.TeamMember func (_m *API) CreateTeamMembers(teamID string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError) { ret := _m.Called(teamID, userIds, requestorId) - if len(ret) == 0 { - panic("no return value specified for CreateTeamMembers") - } - var r0 []*model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMember, *model.AppError)); ok { @@ -468,10 +412,6 @@ func (_m *API) CreateTeamMembers(teamID string, userIds []string, requestorId st func (_m *API) CreateTeamMembersGracefully(teamID string, userIds []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError) { ret := _m.Called(teamID, userIds, requestorId) - if len(ret) == 0 { - panic("no return value specified for CreateTeamMembersGracefully") - } - var r0 []*model.TeamMemberWithError var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMemberWithError, *model.AppError)); ok { @@ -500,10 +440,6 @@ func (_m *API) CreateTeamMembersGracefully(teamID string, userIds []string, requ func (_m *API) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, error) { ret := _m.Called(us) - if len(ret) == 0 { - panic("no return value specified for CreateUploadSession") - } - var r0 *model.UploadSession var r1 error if rf, ok := ret.Get(0).(func(*model.UploadSession) (*model.UploadSession, error)); ok { @@ -530,10 +466,6 @@ func (_m *API) CreateUploadSession(us *model.UploadSession) (*model.UploadSessio func (_m *API) CreateUser(user *model.User) (*model.User, *model.AppError) { ret := _m.Called(user) - if len(ret) == 0 { - panic("no return value specified for CreateUser") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok { @@ -562,10 +494,6 @@ func (_m *API) CreateUser(user *model.User) (*model.User, *model.AppError) { func (_m *API) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError) { ret := _m.Called(token) - if len(ret) == 0 { - panic("no return value specified for CreateUserAccessToken") - } - var r0 *model.UserAccessToken var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.UserAccessToken) (*model.UserAccessToken, *model.AppError)); ok { @@ -594,10 +522,6 @@ func (_m *API) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserA func (_m *API) DeleteChannel(channelId string) *model.AppError { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for DeleteChannel") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(channelId) @@ -614,10 +538,6 @@ func (_m *API) DeleteChannel(channelId string) *model.AppError { func (_m *API) DeleteChannelMember(channelId string, userID string) *model.AppError { ret := _m.Called(channelId, userID) - if len(ret) == 0 { - panic("no return value specified for DeleteChannelMember") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { r0 = rf(channelId, userID) @@ -634,10 +554,6 @@ func (_m *API) DeleteChannelMember(channelId string, userID string) *model.AppEr func (_m *API) DeleteCommand(commandID string) error { ret := _m.Called(commandID) - if len(ret) == 0 { - panic("no return value specified for DeleteCommand") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(commandID) @@ -657,10 +573,6 @@ func (_m *API) DeleteEphemeralPost(userID string, postId string) { func (_m *API) DeleteOAuthApp(appID string) *model.AppError { ret := _m.Called(appID) - if len(ret) == 0 { - panic("no return value specified for DeleteOAuthApp") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(appID) @@ -677,10 +589,6 @@ func (_m *API) DeleteOAuthApp(appID string) *model.AppError { func (_m *API) DeletePost(postId string) *model.AppError { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for DeletePost") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(postId) @@ -697,10 +605,6 @@ func (_m *API) DeletePost(postId string) *model.AppError { func (_m *API) DeletePreferencesForUser(userID string, preferences []model.Preference) *model.AppError { ret := _m.Called(userID, preferences) - if len(ret) == 0 { - panic("no return value specified for DeletePreferencesForUser") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []model.Preference) *model.AppError); ok { r0 = rf(userID, preferences) @@ -717,10 +621,6 @@ func (_m *API) DeletePreferencesForUser(userID string, preferences []model.Prefe func (_m *API) DeleteTeam(teamID string) *model.AppError { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for DeleteTeam") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(teamID) @@ -737,10 +637,6 @@ func (_m *API) DeleteTeam(teamID string) *model.AppError { func (_m *API) DeleteTeamMember(teamID string, userID string, requestorId string) *model.AppError { ret := _m.Called(teamID, userID, requestorId) - if len(ret) == 0 { - panic("no return value specified for DeleteTeamMember") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { r0 = rf(teamID, userID, requestorId) @@ -757,10 +653,6 @@ func (_m *API) DeleteTeamMember(teamID string, userID string, requestorId string func (_m *API) DeleteUser(userID string) *model.AppError { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for DeleteUser") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(userID) @@ -777,10 +669,6 @@ func (_m *API) DeleteUser(userID string) *model.AppError { func (_m *API) DisablePlugin(id string) *model.AppError { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for DisablePlugin") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(id) @@ -797,10 +685,6 @@ func (_m *API) DisablePlugin(id string) *model.AppError { func (_m *API) EnablePlugin(id string) *model.AppError { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for EnablePlugin") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(id) @@ -817,10 +701,6 @@ func (_m *API) EnablePlugin(id string) *model.AppError { func (_m *API) EnsureBotUser(bot *model.Bot) (string, error) { ret := _m.Called(bot) - if len(ret) == 0 { - panic("no return value specified for EnsureBotUser") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(*model.Bot) (string, error)); ok { @@ -845,10 +725,6 @@ func (_m *API) EnsureBotUser(bot *model.Bot) (string, error) { func (_m *API) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error) { ret := _m.Called(commandArgs) - if len(ret) == 0 { - panic("no return value specified for ExecuteSlashCommand") - } - var r0 *model.CommandResponse var r1 error if rf, ok := ret.Get(0).(func(*model.CommandArgs) (*model.CommandResponse, error)); ok { @@ -875,10 +751,6 @@ func (_m *API) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.Comma func (_m *API) ExtendSessionExpiry(sessionID string, newExpiry int64) *model.AppError { ret := _m.Called(sessionID, newExpiry) - if len(ret) == 0 { - panic("no return value specified for ExtendSessionExpiry") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok { r0 = rf(sessionID, newExpiry) @@ -895,10 +767,6 @@ func (_m *API) ExtendSessionExpiry(sessionID string, newExpiry int64) *model.App func (_m *API) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) { ret := _m.Called(botUserId, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetBot") - } - var r0 *model.Bot var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, *model.AppError)); ok { @@ -927,10 +795,6 @@ func (_m *API) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model func (_m *API) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetBots") - } - var r0 []*model.Bot var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.BotGetOptions) ([]*model.Bot, *model.AppError)); ok { @@ -959,10 +823,6 @@ func (_m *API) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppEr func (_m *API) GetBundlePath() (string, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetBundlePath") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func() (string, error)); ok { @@ -987,10 +847,6 @@ func (_m *API) GetBundlePath() (string, error) { func (_m *API) GetChannel(channelId string) (*model.Channel, *model.AppError) { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for GetChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Channel, *model.AppError)); ok { @@ -1019,10 +875,6 @@ func (_m *API) GetChannel(channelId string) (*model.Channel, *model.AppError) { func (_m *API) GetChannelByName(teamID string, name string, includeDeleted bool) (*model.Channel, *model.AppError) { ret := _m.Called(teamID, name, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetChannelByName") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, *model.AppError)); ok { @@ -1051,10 +903,6 @@ func (_m *API) GetChannelByName(teamID string, name string, includeDeleted bool) func (_m *API) GetChannelByNameForTeamName(teamName string, channelName string, includeDeleted bool) (*model.Channel, *model.AppError) { ret := _m.Called(teamName, channelName, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetChannelByNameForTeamName") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, *model.AppError)); ok { @@ -1083,10 +931,6 @@ func (_m *API) GetChannelByNameForTeamName(teamName string, channelName string, func (_m *API) GetChannelMember(channelId string, userID string) (*model.ChannelMember, *model.AppError) { ret := _m.Called(channelId, userID) - if len(ret) == 0 { - panic("no return value specified for GetChannelMember") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelMember, *model.AppError)); ok { @@ -1115,10 +959,6 @@ func (_m *API) GetChannelMember(channelId string, userID string) (*model.Channel func (_m *API) GetChannelMembers(channelId string, page int, perPage int) (model.ChannelMembers, *model.AppError) { ret := _m.Called(channelId, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetChannelMembers") - } - var r0 model.ChannelMembers var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelMembers, *model.AppError)); ok { @@ -1147,10 +987,6 @@ func (_m *API) GetChannelMembers(channelId string, page int, perPage int) (model func (_m *API) GetChannelMembersByIds(channelId string, userIds []string) (model.ChannelMembers, *model.AppError) { ret := _m.Called(channelId, userIds) - if len(ret) == 0 { - panic("no return value specified for GetChannelMembersByIds") - } - var r0 model.ChannelMembers var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) (model.ChannelMembers, *model.AppError)); ok { @@ -1179,10 +1015,6 @@ func (_m *API) GetChannelMembersByIds(channelId string, userIds []string) (model func (_m *API) GetChannelMembersForUser(teamID string, userID string, page int, perPage int) ([]*model.ChannelMember, *model.AppError) { ret := _m.Called(teamID, userID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetChannelMembersForUser") - } - var r0 []*model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.ChannelMember, *model.AppError)); ok { @@ -1211,10 +1043,6 @@ func (_m *API) GetChannelMembersForUser(teamID string, userID string, page int, func (_m *API) GetChannelSidebarCategories(userID string, teamID string) (*model.OrderedSidebarCategories, *model.AppError) { ret := _m.Called(userID, teamID) - if len(ret) == 0 { - panic("no return value specified for GetChannelSidebarCategories") - } - var r0 *model.OrderedSidebarCategories var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.OrderedSidebarCategories, *model.AppError)); ok { @@ -1243,10 +1071,6 @@ func (_m *API) GetChannelSidebarCategories(userID string, teamID string) (*model func (_m *API) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) { ret := _m.Called(channelId) - if len(ret) == 0 { - panic("no return value specified for GetChannelStats") - } - var r0 *model.ChannelStats var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.ChannelStats, *model.AppError)); ok { @@ -1275,10 +1099,6 @@ func (_m *API) GetChannelStats(channelId string) (*model.ChannelStats, *model.Ap func (_m *API) GetChannelsForTeamForUser(teamID string, userID string, includeDeleted bool) ([]*model.Channel, *model.AppError) { ret := _m.Called(teamID, userID, includeDeleted) - if len(ret) == 0 { - panic("no return value specified for GetChannelsForTeamForUser") - } - var r0 []*model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, bool) ([]*model.Channel, *model.AppError)); ok { @@ -1307,10 +1127,6 @@ func (_m *API) GetChannelsForTeamForUser(teamID string, userID string, includeDe func (_m *API) GetCloudLimits() (*model.ProductLimits, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetCloudLimits") - } - var r0 *model.ProductLimits var r1 error if rf, ok := ret.Get(0).(func() (*model.ProductLimits, error)); ok { @@ -1337,10 +1153,6 @@ func (_m *API) GetCloudLimits() (*model.ProductLimits, error) { func (_m *API) GetCommand(commandID string) (*model.Command, error) { ret := _m.Called(commandID) - if len(ret) == 0 { - panic("no return value specified for GetCommand") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Command, error)); ok { @@ -1367,10 +1179,6 @@ func (_m *API) GetCommand(commandID string) (*model.Command, error) { func (_m *API) GetConfig() *model.Config { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetConfig") - } - var r0 *model.Config if rf, ok := ret.Get(0).(func() *model.Config); ok { r0 = rf() @@ -1387,10 +1195,6 @@ func (_m *API) GetConfig() *model.Config { func (_m *API) GetDiagnosticId() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetDiagnosticId") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -1405,10 +1209,6 @@ func (_m *API) GetDiagnosticId() string { func (_m *API) GetDirectChannel(userId1 string, userId2 string) (*model.Channel, *model.AppError) { ret := _m.Called(userId1, userId2) - if len(ret) == 0 { - panic("no return value specified for GetDirectChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.Channel, *model.AppError)); ok { @@ -1437,10 +1237,6 @@ func (_m *API) GetDirectChannel(userId1 string, userId2 string) (*model.Channel, func (_m *API) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) { ret := _m.Called(emojiId) - if len(ret) == 0 { - panic("no return value specified for GetEmoji") - } - var r0 *model.Emoji var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Emoji, *model.AppError)); ok { @@ -1469,10 +1265,6 @@ func (_m *API) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) { func (_m *API) GetEmojiByName(name string) (*model.Emoji, *model.AppError) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetEmojiByName") - } - var r0 *model.Emoji var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Emoji, *model.AppError)); ok { @@ -1501,10 +1293,6 @@ func (_m *API) GetEmojiByName(name string) (*model.Emoji, *model.AppError) { func (_m *API) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) { ret := _m.Called(emojiId) - if len(ret) == 0 { - panic("no return value specified for GetEmojiImage") - } - var r0 []byte var r1 string var r2 *model.AppError @@ -1540,10 +1328,6 @@ func (_m *API) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) { func (_m *API) GetEmojiList(sortBy string, page int, perPage int) ([]*model.Emoji, *model.AppError) { ret := _m.Called(sortBy, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetEmojiList") - } - var r0 []*model.Emoji var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Emoji, *model.AppError)); ok { @@ -1572,10 +1356,6 @@ func (_m *API) GetEmojiList(sortBy string, page int, perPage int) ([]*model.Emoj func (_m *API) GetFile(fileId string) ([]byte, *model.AppError) { ret := _m.Called(fileId) - if len(ret) == 0 { - panic("no return value specified for GetFile") - } - var r0 []byte var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { @@ -1604,10 +1384,6 @@ func (_m *API) GetFile(fileId string) ([]byte, *model.AppError) { func (_m *API) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { ret := _m.Called(fileId) - if len(ret) == 0 { - panic("no return value specified for GetFileInfo") - } - var r0 *model.FileInfo var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, *model.AppError)); ok { @@ -1636,10 +1412,6 @@ func (_m *API) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { func (_m *API) GetFileInfos(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError) { ret := _m.Called(page, perPage, opt) - if len(ret) == 0 { - panic("no return value specified for GetFileInfos") - } - var r0 []*model.FileInfo var r1 *model.AppError if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)); ok { @@ -1668,10 +1440,6 @@ func (_m *API) GetFileInfos(page int, perPage int, opt *model.GetFileInfosOption func (_m *API) GetFileLink(fileId string) (string, *model.AppError) { ret := _m.Called(fileId) - if len(ret) == 0 { - panic("no return value specified for GetFileLink") - } - var r0 string var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (string, *model.AppError)); ok { @@ -1698,10 +1466,6 @@ func (_m *API) GetFileLink(fileId string) (string, *model.AppError) { func (_m *API) GetGroup(groupId string) (*model.Group, *model.AppError) { ret := _m.Called(groupId) - if len(ret) == 0 { - panic("no return value specified for GetGroup") - } - var r0 *model.Group var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok { @@ -1730,10 +1494,6 @@ func (_m *API) GetGroup(groupId string) (*model.Group, *model.AppError) { func (_m *API) GetGroupByName(name string) (*model.Group, *model.AppError) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetGroupByName") - } - var r0 *model.Group var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok { @@ -1762,10 +1522,6 @@ func (_m *API) GetGroupByName(name string) (*model.Group, *model.AppError) { func (_m *API) GetGroupChannel(userIds []string) (*model.Channel, *model.AppError) { ret := _m.Called(userIds) - if len(ret) == 0 { - panic("no return value specified for GetGroupChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func([]string) (*model.Channel, *model.AppError)); ok { @@ -1794,10 +1550,6 @@ func (_m *API) GetGroupChannel(userIds []string) (*model.Channel, *model.AppErro func (_m *API) GetGroupMemberUsers(groupID string, page int, perPage int) ([]*model.User, *model.AppError) { ret := _m.Called(groupID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetGroupMemberUsers") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.User, *model.AppError)); ok { @@ -1826,10 +1578,6 @@ func (_m *API) GetGroupMemberUsers(groupID string, page int, perPage int) ([]*mo func (_m *API) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) { ret := _m.Called(groupSource) - if len(ret) == 0 { - panic("no return value specified for GetGroupsBySource") - } - var r0 []*model.Group var r1 *model.AppError if rf, ok := ret.Get(0).(func(model.GroupSource) ([]*model.Group, *model.AppError)); ok { @@ -1858,10 +1606,6 @@ func (_m *API) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, func (_m *API) GetGroupsForUser(userID string) ([]*model.Group, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetGroupsForUser") - } - var r0 []*model.Group var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]*model.Group, *model.AppError)); ok { @@ -1890,10 +1634,6 @@ func (_m *API) GetGroupsForUser(userID string) ([]*model.Group, *model.AppError) func (_m *API) GetLDAPUserAttributes(userID string, attributes []string) (map[string]string, *model.AppError) { ret := _m.Called(userID, attributes) - if len(ret) == 0 { - panic("no return value specified for GetLDAPUserAttributes") - } - var r0 map[string]string var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []string) (map[string]string, *model.AppError)); ok { @@ -1922,10 +1662,6 @@ func (_m *API) GetLDAPUserAttributes(userID string, attributes []string) (map[st func (_m *API) GetLicense() *model.License { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetLicense") - } - var r0 *model.License if rf, ok := ret.Get(0).(func() *model.License); ok { r0 = rf() @@ -1942,10 +1678,6 @@ func (_m *API) GetLicense() *model.License { func (_m *API) GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError) { ret := _m.Called(appID) - if len(ret) == 0 { - panic("no return value specified for GetOAuthApp") - } - var r0 *model.OAuthApp var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.OAuthApp, *model.AppError)); ok { @@ -1974,10 +1706,6 @@ func (_m *API) GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError) { func (_m *API) GetPluginConfig() map[string]interface{} { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPluginConfig") - } - var r0 map[string]interface{} if rf, ok := ret.Get(0).(func() map[string]interface{}); ok { r0 = rf() @@ -1994,10 +1722,6 @@ func (_m *API) GetPluginConfig() map[string]interface{} { func (_m *API) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for GetPluginStatus") - } - var r0 *model.PluginStatus var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.PluginStatus, *model.AppError)); ok { @@ -2026,10 +1750,6 @@ func (_m *API) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) func (_m *API) GetPlugins() ([]*model.Manifest, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetPlugins") - } - var r0 []*model.Manifest var r1 *model.AppError if rf, ok := ret.Get(0).(func() ([]*model.Manifest, *model.AppError)); ok { @@ -2058,10 +1778,6 @@ func (_m *API) GetPlugins() ([]*model.Manifest, *model.AppError) { func (_m *API) GetPost(postId string) (*model.Post, *model.AppError) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetPost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Post, *model.AppError)); ok { @@ -2090,10 +1806,6 @@ func (_m *API) GetPost(postId string) (*model.Post, *model.AppError) { func (_m *API) GetPostThread(postId string) (*model.PostList, *model.AppError) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetPostThread") - } - var r0 *model.PostList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.PostList, *model.AppError)); ok { @@ -2122,10 +1834,6 @@ func (_m *API) GetPostThread(postId string) (*model.PostList, *model.AppError) { func (_m *API) GetPostsAfter(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { ret := _m.Called(channelId, postId, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetPostsAfter") - } - var r0 *model.PostList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, *model.AppError)); ok { @@ -2154,10 +1862,6 @@ func (_m *API) GetPostsAfter(channelId string, postId string, page int, perPage func (_m *API) GetPostsBefore(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { ret := _m.Called(channelId, postId, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetPostsBefore") - } - var r0 *model.PostList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, *model.AppError)); ok { @@ -2186,10 +1890,6 @@ func (_m *API) GetPostsBefore(channelId string, postId string, page int, perPage func (_m *API) GetPostsForChannel(channelId string, page int, perPage int) (*model.PostList, *model.AppError) { ret := _m.Called(channelId, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetPostsForChannel") - } - var r0 *model.PostList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) (*model.PostList, *model.AppError)); ok { @@ -2218,10 +1918,6 @@ func (_m *API) GetPostsForChannel(channelId string, page int, perPage int) (*mod func (_m *API) GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError) { ret := _m.Called(channelId, time) - if len(ret) == 0 { - panic("no return value specified for GetPostsSince") - } - var r0 *model.PostList var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int64) (*model.PostList, *model.AppError)); ok { @@ -2250,10 +1946,6 @@ func (_m *API) GetPostsSince(channelId string, time int64) (*model.PostList, *mo func (_m *API) GetPreferenceForUser(userID string, category string, name string) (model.Preference, *model.AppError) { ret := _m.Called(userID, category, name) - if len(ret) == 0 { - panic("no return value specified for GetPreferenceForUser") - } - var r0 model.Preference var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) (model.Preference, *model.AppError)); ok { @@ -2280,10 +1972,6 @@ func (_m *API) GetPreferenceForUser(userID string, category string, name string) func (_m *API) GetPreferencesForUser(userID string) ([]model.Preference, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetPreferencesForUser") - } - var r0 []model.Preference var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]model.Preference, *model.AppError)); ok { @@ -2312,10 +2000,6 @@ func (_m *API) GetPreferencesForUser(userID string) ([]model.Preference, *model. func (_m *API) GetProfileImage(userID string) ([]byte, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetProfileImage") - } - var r0 []byte var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { @@ -2344,10 +2028,6 @@ func (_m *API) GetProfileImage(userID string) ([]byte, *model.AppError) { func (_m *API) GetPublicChannelsForTeam(teamID string, page int, perPage int) ([]*model.Channel, *model.AppError) { ret := _m.Called(teamID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetPublicChannelsForTeam") - } - var r0 []*model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Channel, *model.AppError)); ok { @@ -2376,10 +2056,6 @@ func (_m *API) GetPublicChannelsForTeam(teamID string, page int, perPage int) ([ func (_m *API) GetReactions(postId string) ([]*model.Reaction, *model.AppError) { ret := _m.Called(postId) - if len(ret) == 0 { - panic("no return value specified for GetReactions") - } - var r0 []*model.Reaction var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]*model.Reaction, *model.AppError)); ok { @@ -2408,10 +2084,6 @@ func (_m *API) GetReactions(postId string) ([]*model.Reaction, *model.AppError) func (_m *API) GetServerVersion() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetServerVersion") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -2426,10 +2098,6 @@ func (_m *API) GetServerVersion() string { func (_m *API) GetSession(sessionID string) (*model.Session, *model.AppError) { ret := _m.Called(sessionID) - if len(ret) == 0 { - panic("no return value specified for GetSession") - } - var r0 *model.Session var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Session, *model.AppError)); ok { @@ -2458,10 +2126,6 @@ func (_m *API) GetSession(sessionID string) (*model.Session, *model.AppError) { func (_m *API) GetSystemInstallDate() (int64, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetSystemInstallDate") - } - var r0 int64 var r1 *model.AppError if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok { @@ -2488,10 +2152,6 @@ func (_m *API) GetSystemInstallDate() (int64, *model.AppError) { func (_m *API) GetTeam(teamID string) (*model.Team, *model.AppError) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetTeam") - } - var r0 *model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Team, *model.AppError)); ok { @@ -2520,10 +2180,6 @@ func (_m *API) GetTeam(teamID string) (*model.Team, *model.AppError) { func (_m *API) GetTeamByName(name string) (*model.Team, *model.AppError) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetTeamByName") - } - var r0 *model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Team, *model.AppError)); ok { @@ -2552,10 +2208,6 @@ func (_m *API) GetTeamByName(name string) (*model.Team, *model.AppError) { func (_m *API) GetTeamIcon(teamID string) ([]byte, *model.AppError) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetTeamIcon") - } - var r0 []byte var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { @@ -2584,10 +2236,6 @@ func (_m *API) GetTeamIcon(teamID string) ([]byte, *model.AppError) { func (_m *API) GetTeamMember(teamID string, userID string) (*model.TeamMember, *model.AppError) { ret := _m.Called(teamID, userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamMember") - } - var r0 *model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.TeamMember, *model.AppError)); ok { @@ -2616,10 +2264,6 @@ func (_m *API) GetTeamMember(teamID string, userID string) (*model.TeamMember, * func (_m *API) GetTeamMembers(teamID string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { ret := _m.Called(teamID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetTeamMembers") - } - var r0 []*model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, *model.AppError)); ok { @@ -2648,10 +2292,6 @@ func (_m *API) GetTeamMembers(teamID string, page int, perPage int) ([]*model.Te func (_m *API) GetTeamMembersForUser(userID string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { ret := _m.Called(userID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetTeamMembersForUser") - } - var r0 []*model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, *model.AppError)); ok { @@ -2680,10 +2320,6 @@ func (_m *API) GetTeamMembersForUser(userID string, page int, perPage int) ([]*m func (_m *API) GetTeamStats(teamID string) (*model.TeamStats, *model.AppError) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for GetTeamStats") - } - var r0 *model.TeamStats var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.TeamStats, *model.AppError)); ok { @@ -2712,10 +2348,6 @@ func (_m *API) GetTeamStats(teamID string) (*model.TeamStats, *model.AppError) { func (_m *API) GetTeams() ([]*model.Team, *model.AppError) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetTeams") - } - var r0 []*model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func() ([]*model.Team, *model.AppError)); ok { @@ -2744,10 +2376,6 @@ func (_m *API) GetTeams() ([]*model.Team, *model.AppError) { func (_m *API) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamsForUser") - } - var r0 []*model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]*model.Team, *model.AppError)); ok { @@ -2776,10 +2404,6 @@ func (_m *API) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError) { func (_m *API) GetTeamsUnreadForUser(userID string) ([]*model.TeamUnread, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetTeamsUnreadForUser") - } - var r0 []*model.TeamUnread var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]*model.TeamUnread, *model.AppError)); ok { @@ -2808,10 +2432,6 @@ func (_m *API) GetTeamsUnreadForUser(userID string) ([]*model.TeamUnread, *model func (_m *API) GetTelemetryId() string { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetTelemetryId") - } - var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -2826,10 +2446,6 @@ func (_m *API) GetTelemetryId() string { func (_m *API) GetUnsanitizedConfig() *model.Config { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for GetUnsanitizedConfig") - } - var r0 *model.Config if rf, ok := ret.Get(0).(func() *model.Config); ok { r0 = rf() @@ -2846,10 +2462,6 @@ func (_m *API) GetUnsanitizedConfig() *model.Config { func (_m *API) GetUploadSession(uploadID string) (*model.UploadSession, error) { ret := _m.Called(uploadID) - if len(ret) == 0 { - panic("no return value specified for GetUploadSession") - } - var r0 *model.UploadSession var r1 error if rf, ok := ret.Get(0).(func(string) (*model.UploadSession, error)); ok { @@ -2876,10 +2488,6 @@ func (_m *API) GetUploadSession(uploadID string) (*model.UploadSession, error) { func (_m *API) GetUser(userID string) (*model.User, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetUser") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { @@ -2908,10 +2516,6 @@ func (_m *API) GetUser(userID string) (*model.User, *model.AppError) { func (_m *API) GetUserByEmail(email string) (*model.User, *model.AppError) { ret := _m.Called(email) - if len(ret) == 0 { - panic("no return value specified for GetUserByEmail") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { @@ -2940,10 +2544,6 @@ func (_m *API) GetUserByEmail(email string) (*model.User, *model.AppError) { func (_m *API) GetUserByUsername(name string) (*model.User, *model.AppError) { ret := _m.Called(name) - if len(ret) == 0 { - panic("no return value specified for GetUserByUsername") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { @@ -2972,10 +2572,6 @@ func (_m *API) GetUserByUsername(name string) (*model.User, *model.AppError) { func (_m *API) GetUserStatus(userID string) (*model.Status, *model.AppError) { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for GetUserStatus") - } - var r0 *model.Status var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) (*model.Status, *model.AppError)); ok { @@ -3004,10 +2600,6 @@ func (_m *API) GetUserStatus(userID string) (*model.Status, *model.AppError) { func (_m *API) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError) { ret := _m.Called(userIds) - if len(ret) == 0 { - panic("no return value specified for GetUserStatusesByIds") - } - var r0 []*model.Status var r1 *model.AppError if rf, ok := ret.Get(0).(func([]string) ([]*model.Status, *model.AppError)); ok { @@ -3036,10 +2628,6 @@ func (_m *API) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.A func (_m *API) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError) { ret := _m.Called(options) - if len(ret) == 0 { - panic("no return value specified for GetUsers") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, *model.AppError)); ok { @@ -3068,10 +2656,6 @@ func (_m *API) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.Ap func (_m *API) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) { ret := _m.Called(usernames) - if len(ret) == 0 { - panic("no return value specified for GetUsersByUsernames") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func([]string) ([]*model.User, *model.AppError)); ok { @@ -3100,10 +2684,6 @@ func (_m *API) GetUsersByUsernames(usernames []string) ([]*model.User, *model.Ap func (_m *API) GetUsersInChannel(channelID string, sortBy string, page int, perPage int) ([]*model.User, *model.AppError) { ret := _m.Called(channelID, sortBy, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetUsersInChannel") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.User, *model.AppError)); ok { @@ -3132,10 +2712,6 @@ func (_m *API) GetUsersInChannel(channelID string, sortBy string, page int, perP func (_m *API) GetUsersInTeam(teamID string, page int, perPage int) ([]*model.User, *model.AppError) { ret := _m.Called(teamID, page, perPage) - if len(ret) == 0 { - panic("no return value specified for GetUsersInTeam") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.User, *model.AppError)); ok { @@ -3164,10 +2740,6 @@ func (_m *API) GetUsersInTeam(teamID string, page int, perPage int) ([]*model.Us func (_m *API) HasPermissionTo(userID string, permission *model.Permission) bool { ret := _m.Called(userID, permission) - if len(ret) == 0 { - panic("no return value specified for HasPermissionTo") - } - var r0 bool if rf, ok := ret.Get(0).(func(string, *model.Permission) bool); ok { r0 = rf(userID, permission) @@ -3182,10 +2754,6 @@ func (_m *API) HasPermissionTo(userID string, permission *model.Permission) bool func (_m *API) HasPermissionToChannel(userID string, channelId string, permission *model.Permission) bool { ret := _m.Called(userID, channelId, permission) - if len(ret) == 0 { - panic("no return value specified for HasPermissionToChannel") - } - var r0 bool if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { r0 = rf(userID, channelId, permission) @@ -3200,10 +2768,6 @@ func (_m *API) HasPermissionToChannel(userID string, channelId string, permissio func (_m *API) HasPermissionToTeam(userID string, teamID string, permission *model.Permission) bool { ret := _m.Called(userID, teamID, permission) - if len(ret) == 0 { - panic("no return value specified for HasPermissionToTeam") - } - var r0 bool if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { r0 = rf(userID, teamID, permission) @@ -3218,10 +2782,6 @@ func (_m *API) HasPermissionToTeam(userID string, teamID string, permission *mod func (_m *API) InstallPlugin(file io.Reader, replace bool) (*model.Manifest, *model.AppError) { ret := _m.Called(file, replace) - if len(ret) == 0 { - panic("no return value specified for InstallPlugin") - } - var r0 *model.Manifest var r1 *model.AppError if rf, ok := ret.Get(0).(func(io.Reader, bool) (*model.Manifest, *model.AppError)); ok { @@ -3250,10 +2810,6 @@ func (_m *API) InstallPlugin(file io.Reader, replace bool) (*model.Manifest, *mo func (_m *API) InviteRemoteToChannel(channelID string, remoteID string, userID string, shareIfNotShared bool) error { ret := _m.Called(channelID, remoteID, userID, shareIfNotShared) - if len(ret) == 0 { - panic("no return value specified for InviteRemoteToChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, string, bool) error); ok { r0 = rf(channelID, remoteID, userID, shareIfNotShared) @@ -3268,10 +2824,6 @@ func (_m *API) InviteRemoteToChannel(channelID string, remoteID string, userID s func (_m *API) IsEnterpriseReady() bool { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for IsEnterpriseReady") - } - var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -3286,10 +2838,6 @@ func (_m *API) IsEnterpriseReady() bool { func (_m *API) KVCompareAndDelete(key string, oldValue []byte) (bool, *model.AppError) { ret := _m.Called(key, oldValue) - if len(ret) == 0 { - panic("no return value specified for KVCompareAndDelete") - } - var r0 bool var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte) (bool, *model.AppError)); ok { @@ -3316,10 +2864,6 @@ func (_m *API) KVCompareAndDelete(key string, oldValue []byte) (bool, *model.App func (_m *API) KVCompareAndSet(key string, oldValue []byte, newValue []byte) (bool, *model.AppError) { ret := _m.Called(key, oldValue, newValue) - if len(ret) == 0 { - panic("no return value specified for KVCompareAndSet") - } - var r0 bool var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte, []byte) (bool, *model.AppError)); ok { @@ -3346,10 +2890,6 @@ func (_m *API) KVCompareAndSet(key string, oldValue []byte, newValue []byte) (bo func (_m *API) KVDelete(key string) *model.AppError { ret := _m.Called(key) - if len(ret) == 0 { - panic("no return value specified for KVDelete") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(key) @@ -3366,10 +2906,6 @@ func (_m *API) KVDelete(key string) *model.AppError { func (_m *API) KVDeleteAll() *model.AppError { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for KVDeleteAll") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func() *model.AppError); ok { r0 = rf() @@ -3386,10 +2922,6 @@ func (_m *API) KVDeleteAll() *model.AppError { func (_m *API) KVGet(key string) ([]byte, *model.AppError) { ret := _m.Called(key) - if len(ret) == 0 { - panic("no return value specified for KVGet") - } - var r0 []byte var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { @@ -3418,10 +2950,6 @@ func (_m *API) KVGet(key string) ([]byte, *model.AppError) { func (_m *API) KVList(page int, perPage int) ([]string, *model.AppError) { ret := _m.Called(page, perPage) - if len(ret) == 0 { - panic("no return value specified for KVList") - } - var r0 []string var r1 *model.AppError if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok { @@ -3450,10 +2978,6 @@ func (_m *API) KVList(page int, perPage int) ([]string, *model.AppError) { func (_m *API) KVSet(key string, value []byte) *model.AppError { ret := _m.Called(key, value) - if len(ret) == 0 { - panic("no return value specified for KVSet") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { r0 = rf(key, value) @@ -3470,10 +2994,6 @@ func (_m *API) KVSet(key string, value []byte) *model.AppError { func (_m *API) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError { ret := _m.Called(key, value, expireInSeconds) - if len(ret) == 0 { - panic("no return value specified for KVSetWithExpiry") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte, int64) *model.AppError); ok { r0 = rf(key, value, expireInSeconds) @@ -3490,10 +3010,6 @@ func (_m *API) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) func (_m *API) KVSetWithOptions(key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError) { ret := _m.Called(key, value, options) - if len(ret) == 0 { - panic("no return value specified for KVSetWithOptions") - } - var r0 bool var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte, model.PluginKVSetOptions) (bool, *model.AppError)); ok { @@ -3520,10 +3036,6 @@ func (_m *API) KVSetWithOptions(key string, value []byte, options model.PluginKV func (_m *API) ListBuiltInCommands() ([]*model.Command, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for ListBuiltInCommands") - } - var r0 []*model.Command var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Command, error)); ok { @@ -3550,10 +3062,6 @@ func (_m *API) ListBuiltInCommands() ([]*model.Command, error) { func (_m *API) ListCommands(teamID string) ([]*model.Command, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for ListCommands") - } - var r0 []*model.Command var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { @@ -3580,10 +3088,6 @@ func (_m *API) ListCommands(teamID string) ([]*model.Command, error) { func (_m *API) ListCustomCommands(teamID string) ([]*model.Command, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for ListCustomCommands") - } - var r0 []*model.Command var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { @@ -3610,10 +3114,6 @@ func (_m *API) ListCustomCommands(teamID string) ([]*model.Command, error) { func (_m *API) ListPluginCommands(teamID string) ([]*model.Command, error) { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for ListPluginCommands") - } - var r0 []*model.Command var r1 error if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { @@ -3640,10 +3140,6 @@ func (_m *API) ListPluginCommands(teamID string) ([]*model.Command, error) { func (_m *API) LoadPluginConfiguration(dest interface{}) error { ret := _m.Called(dest) - if len(ret) == 0 { - panic("no return value specified for LoadPluginConfiguration") - } - var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(dest) @@ -3690,10 +3186,6 @@ func (_m *API) LogWarn(msg string, keyValuePairs ...interface{}) { func (_m *API) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError { ret := _m.Called(dialog) - if len(ret) == 0 { - panic("no return value specified for OpenInteractiveDialog") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(model.OpenDialogRequest) *model.AppError); ok { r0 = rf(dialog) @@ -3710,10 +3202,6 @@ func (_m *API) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppE func (_m *API) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError) { ret := _m.Called(botUserId, botPatch) - if len(ret) == 0 { - panic("no return value specified for PatchBot") - } - var r0 *model.Bot var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, *model.BotPatch) (*model.Bot, *model.AppError)); ok { @@ -3742,10 +3230,6 @@ func (_m *API) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, func (_m *API) PatchChannelMembersNotifications(members []*model.ChannelMemberIdentifier, notifyProps map[string]string) *model.AppError { ret := _m.Called(members, notifyProps) - if len(ret) == 0 { - panic("no return value specified for PatchChannelMembersNotifications") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func([]*model.ChannelMemberIdentifier, map[string]string) *model.AppError); ok { r0 = rf(members, notifyProps) @@ -3762,10 +3246,6 @@ func (_m *API) PatchChannelMembersNotifications(members []*model.ChannelMemberId func (_m *API) PermanentDeleteBot(botUserId string) *model.AppError { ret := _m.Called(botUserId) - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteBot") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(botUserId) @@ -3782,10 +3262,6 @@ func (_m *API) PermanentDeleteBot(botUserId string) *model.AppError { func (_m *API) PluginHTTP(request *http.Request) *http.Response { ret := _m.Called(request) - if len(ret) == 0 { - panic("no return value specified for PluginHTTP") - } - var r0 *http.Response if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok { r0 = rf(request) @@ -3802,10 +3278,6 @@ func (_m *API) PluginHTTP(request *http.Request) *http.Response { func (_m *API) PublishPluginClusterEvent(ev model.PluginClusterEvent, opts model.PluginClusterEventSendOptions) error { ret := _m.Called(ev, opts) - if len(ret) == 0 { - panic("no return value specified for PublishPluginClusterEvent") - } - var r0 error if rf, ok := ret.Get(0).(func(model.PluginClusterEvent, model.PluginClusterEventSendOptions) error); ok { r0 = rf(ev, opts) @@ -3820,10 +3292,6 @@ func (_m *API) PublishPluginClusterEvent(ev model.PluginClusterEvent, opts model func (_m *API) PublishUserTyping(userID string, channelId string, parentId string) *model.AppError { ret := _m.Called(userID, channelId, parentId) - if len(ret) == 0 { - panic("no return value specified for PublishUserTyping") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { r0 = rf(userID, channelId, parentId) @@ -3845,10 +3313,6 @@ func (_m *API) PublishWebSocketEvent(event string, payload map[string]interface{ func (_m *API) ReadFile(path string) ([]byte, *model.AppError) { ret := _m.Called(path) - if len(ret) == 0 { - panic("no return value specified for ReadFile") - } - var r0 []byte var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { @@ -3877,10 +3341,6 @@ func (_m *API) ReadFile(path string) ([]byte, *model.AppError) { func (_m *API) RegisterCollectionAndTopic(collectionType string, topicType string) error { ret := _m.Called(collectionType, topicType) - if len(ret) == 0 { - panic("no return value specified for RegisterCollectionAndTopic") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(collectionType, topicType) @@ -3895,10 +3355,6 @@ func (_m *API) RegisterCollectionAndTopic(collectionType string, topicType strin func (_m *API) RegisterCommand(command *model.Command) error { ret := _m.Called(command) - if len(ret) == 0 { - panic("no return value specified for RegisterCommand") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.Command) error); ok { r0 = rf(command) @@ -3913,10 +3369,6 @@ func (_m *API) RegisterCommand(command *model.Command) error { func (_m *API) RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (string, error) { ret := _m.Called(opts) - if len(ret) == 0 { - panic("no return value specified for RegisterPluginForSharedChannels") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(model.RegisterPluginOpts) (string, error)); ok { @@ -3941,10 +3393,6 @@ func (_m *API) RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (s func (_m *API) RemovePlugin(id string) *model.AppError { ret := _m.Called(id) - if len(ret) == 0 { - panic("no return value specified for RemovePlugin") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(id) @@ -3961,10 +3409,6 @@ func (_m *API) RemovePlugin(id string) *model.AppError { func (_m *API) RemoveReaction(reaction *model.Reaction) *model.AppError { ret := _m.Called(reaction) - if len(ret) == 0 { - panic("no return value specified for RemoveReaction") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Reaction) *model.AppError); ok { r0 = rf(reaction) @@ -3981,10 +3425,6 @@ func (_m *API) RemoveReaction(reaction *model.Reaction) *model.AppError { func (_m *API) RemoveTeamIcon(teamID string) *model.AppError { ret := _m.Called(teamID) - if len(ret) == 0 { - panic("no return value specified for RemoveTeamIcon") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(teamID) @@ -4001,10 +3441,6 @@ func (_m *API) RemoveTeamIcon(teamID string) *model.AppError { func (_m *API) RemoveUserCustomStatus(userID string) *model.AppError { ret := _m.Called(userID) - if len(ret) == 0 { - panic("no return value specified for RemoveUserCustomStatus") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(userID) @@ -4021,10 +3457,6 @@ func (_m *API) RemoveUserCustomStatus(userID string) *model.AppError { func (_m *API) RequestTrialLicense(requesterID string, users int, termsAccepted bool, receiveEmailsAccepted bool) *model.AppError { ret := _m.Called(requesterID, users, termsAccepted, receiveEmailsAccepted) - if len(ret) == 0 { - panic("no return value specified for RequestTrialLicense") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, int, bool, bool) *model.AppError); ok { r0 = rf(requesterID, users, termsAccepted, receiveEmailsAccepted) @@ -4041,10 +3473,6 @@ func (_m *API) RequestTrialLicense(requesterID string, users int, termsAccepted func (_m *API) RevokeSession(sessionID string) *model.AppError { ret := _m.Called(sessionID) - if len(ret) == 0 { - panic("no return value specified for RevokeSession") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(sessionID) @@ -4061,10 +3489,6 @@ func (_m *API) RevokeSession(sessionID string) *model.AppError { func (_m *API) RevokeUserAccessToken(tokenID string) *model.AppError { ret := _m.Called(tokenID) - if len(ret) == 0 { - panic("no return value specified for RevokeUserAccessToken") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { r0 = rf(tokenID) @@ -4081,10 +3505,6 @@ func (_m *API) RevokeUserAccessToken(tokenID string) *model.AppError { func (_m *API) RolesGrantPermission(roleNames []string, permissionId string) bool { ret := _m.Called(roleNames, permissionId) - if len(ret) == 0 { - panic("no return value specified for RolesGrantPermission") - } - var r0 bool if rf, ok := ret.Get(0).(func([]string, string) bool); ok { r0 = rf(roleNames, permissionId) @@ -4099,10 +3519,6 @@ func (_m *API) RolesGrantPermission(roleNames []string, permissionId string) boo func (_m *API) SaveConfig(config *model.Config) *model.AppError { ret := _m.Called(config) - if len(ret) == 0 { - panic("no return value specified for SaveConfig") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.Config) *model.AppError); ok { r0 = rf(config) @@ -4119,10 +3535,6 @@ func (_m *API) SaveConfig(config *model.Config) *model.AppError { func (_m *API) SavePluginConfig(config map[string]interface{}) *model.AppError { ret := _m.Called(config) - if len(ret) == 0 { - panic("no return value specified for SavePluginConfig") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(map[string]interface{}) *model.AppError); ok { r0 = rf(config) @@ -4139,10 +3551,6 @@ func (_m *API) SavePluginConfig(config map[string]interface{}) *model.AppError { func (_m *API) SearchChannels(teamID string, term string) ([]*model.Channel, *model.AppError) { ret := _m.Called(teamID, term) - if len(ret) == 0 { - panic("no return value specified for SearchChannels") - } - var r0 []*model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) ([]*model.Channel, *model.AppError)); ok { @@ -4171,10 +3579,6 @@ func (_m *API) SearchChannels(teamID string, term string) ([]*model.Channel, *mo func (_m *API) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError) { ret := _m.Called(teamID, paramsList) - if len(ret) == 0 { - panic("no return value specified for SearchPostsInTeam") - } - var r0 []*model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, []*model.SearchParams) ([]*model.Post, *model.AppError)); ok { @@ -4203,10 +3607,6 @@ func (_m *API) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams func (_m *API) SearchPostsInTeamForUser(teamID string, userID string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError) { ret := _m.Called(teamID, userID, searchParams) - if len(ret) == 0 { - panic("no return value specified for SearchPostsInTeamForUser") - } - var r0 *model.PostSearchResults var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, model.SearchParameter) (*model.PostSearchResults, *model.AppError)); ok { @@ -4235,10 +3635,6 @@ func (_m *API) SearchPostsInTeamForUser(teamID string, userID string, searchPara func (_m *API) SearchTeams(term string) ([]*model.Team, *model.AppError) { ret := _m.Called(term) - if len(ret) == 0 { - panic("no return value specified for SearchTeams") - } - var r0 []*model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(string) ([]*model.Team, *model.AppError)); ok { @@ -4267,10 +3663,6 @@ func (_m *API) SearchTeams(term string) ([]*model.Team, *model.AppError) { func (_m *API) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) { ret := _m.Called(search) - if len(ret) == 0 { - panic("no return value specified for SearchUsers") - } - var r0 []*model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.UserSearch) ([]*model.User, *model.AppError)); ok { @@ -4299,10 +3691,6 @@ func (_m *API) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppE func (_m *API) SendEphemeralPost(userID string, post *model.Post) *model.Post { ret := _m.Called(userID, post) - if len(ret) == 0 { - panic("no return value specified for SendEphemeralPost") - } - var r0 *model.Post if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { r0 = rf(userID, post) @@ -4319,10 +3707,6 @@ func (_m *API) SendEphemeralPost(userID string, post *model.Post) *model.Post { func (_m *API) SendMail(to string, subject string, htmlBody string) *model.AppError { ret := _m.Called(to, subject, htmlBody) - if len(ret) == 0 { - panic("no return value specified for SendMail") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { r0 = rf(to, subject, htmlBody) @@ -4339,10 +3723,6 @@ func (_m *API) SendMail(to string, subject string, htmlBody string) *model.AppEr func (_m *API) SendPushNotification(notification *model.PushNotification, userID string) *model.AppError { ret := _m.Called(notification, userID) - if len(ret) == 0 { - panic("no return value specified for SendPushNotification") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(*model.PushNotification, string) *model.AppError); ok { r0 = rf(notification, userID) @@ -4359,10 +3739,6 @@ func (_m *API) SendPushNotification(notification *model.PushNotification, userID func (_m *API) SetFileSearchableContent(fileID string, content string) *model.AppError { ret := _m.Called(fileID, content) - if len(ret) == 0 { - panic("no return value specified for SetFileSearchableContent") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { r0 = rf(fileID, content) @@ -4379,10 +3755,6 @@ func (_m *API) SetFileSearchableContent(fileID string, content string) *model.Ap func (_m *API) SetProfileImage(userID string, data []byte) *model.AppError { ret := _m.Called(userID, data) - if len(ret) == 0 { - panic("no return value specified for SetProfileImage") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { r0 = rf(userID, data) @@ -4399,10 +3771,6 @@ func (_m *API) SetProfileImage(userID string, data []byte) *model.AppError { func (_m *API) SetTeamIcon(teamID string, data []byte) *model.AppError { ret := _m.Called(teamID, data) - if len(ret) == 0 { - panic("no return value specified for SetTeamIcon") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { r0 = rf(teamID, data) @@ -4419,10 +3787,6 @@ func (_m *API) SetTeamIcon(teamID string, data []byte) *model.AppError { func (_m *API) SetUserStatusTimedDND(userId string, endtime int64) (*model.Status, *model.AppError) { ret := _m.Called(userId, endtime) - if len(ret) == 0 { - panic("no return value specified for SetUserStatusTimedDND") - } - var r0 *model.Status var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, int64) (*model.Status, *model.AppError)); ok { @@ -4451,10 +3815,6 @@ func (_m *API) SetUserStatusTimedDND(userId string, endtime int64) (*model.Statu func (_m *API) ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error) { ret := _m.Called(sc) - if len(ret) == 0 { - panic("no return value specified for ShareChannel") - } - var r0 *model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { @@ -4481,10 +3841,6 @@ func (_m *API) ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, erro func (_m *API) SyncSharedChannel(channelID string) error { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for SyncSharedChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(channelID) @@ -4499,10 +3855,6 @@ func (_m *API) SyncSharedChannel(channelID string) error { func (_m *API) UninviteRemoteFromChannel(channelID string, remoteID string) error { ret := _m.Called(channelID, remoteID) - if len(ret) == 0 { - panic("no return value specified for UninviteRemoteFromChannel") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(channelID, remoteID) @@ -4517,10 +3869,6 @@ func (_m *API) UninviteRemoteFromChannel(channelID string, remoteID string) erro func (_m *API) UnregisterCommand(teamID string, trigger string) error { ret := _m.Called(teamID, trigger) - if len(ret) == 0 { - panic("no return value specified for UnregisterCommand") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(teamID, trigger) @@ -4535,10 +3883,6 @@ func (_m *API) UnregisterCommand(teamID string, trigger string) error { func (_m *API) UnregisterPluginForSharedChannels(pluginID string) error { ret := _m.Called(pluginID) - if len(ret) == 0 { - panic("no return value specified for UnregisterPluginForSharedChannels") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(pluginID) @@ -4553,10 +3897,6 @@ func (_m *API) UnregisterPluginForSharedChannels(pluginID string) error { func (_m *API) UnshareChannel(channelID string) (bool, error) { ret := _m.Called(channelID) - if len(ret) == 0 { - panic("no return value specified for UnshareChannel") - } - var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -4581,10 +3921,6 @@ func (_m *API) UnshareChannel(channelID string) (bool, error) { func (_m *API) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError) { ret := _m.Called(botUserId, active) - if len(ret) == 0 { - panic("no return value specified for UpdateBotActive") - } - var r0 *model.Bot var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, *model.AppError)); ok { @@ -4613,10 +3949,6 @@ func (_m *API) UpdateBotActive(botUserId string, active bool) (*model.Bot, *mode func (_m *API) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { ret := _m.Called(channel) - if len(ret) == 0 { - panic("no return value specified for UpdateChannel") - } - var r0 *model.Channel var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Channel) (*model.Channel, *model.AppError)); ok { @@ -4645,10 +3977,6 @@ func (_m *API) UpdateChannel(channel *model.Channel) (*model.Channel, *model.App func (_m *API) UpdateChannelMemberNotifications(channelId string, userID string, notifications map[string]string) (*model.ChannelMember, *model.AppError) { ret := _m.Called(channelId, userID, notifications) - if len(ret) == 0 { - panic("no return value specified for UpdateChannelMemberNotifications") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, map[string]string) (*model.ChannelMember, *model.AppError)); ok { @@ -4677,10 +4005,6 @@ func (_m *API) UpdateChannelMemberNotifications(channelId string, userID string, func (_m *API) UpdateChannelMemberRoles(channelId string, userID string, newRoles string) (*model.ChannelMember, *model.AppError) { ret := _m.Called(channelId, userID, newRoles) - if len(ret) == 0 { - panic("no return value specified for UpdateChannelMemberRoles") - } - var r0 *model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) (*model.ChannelMember, *model.AppError)); ok { @@ -4709,10 +4033,6 @@ func (_m *API) UpdateChannelMemberRoles(channelId string, userID string, newRole func (_m *API) UpdateChannelSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) { ret := _m.Called(userID, teamID, categories) - if len(ret) == 0 { - panic("no return value specified for UpdateChannelSidebarCategories") - } - var r0 []*model.SidebarCategoryWithChannels var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError)); ok { @@ -4741,10 +4061,6 @@ func (_m *API) UpdateChannelSidebarCategories(userID string, teamID string, cate func (_m *API) UpdateCommand(commandID string, updatedCmd *model.Command) (*model.Command, error) { ret := _m.Called(commandID, updatedCmd) - if len(ret) == 0 { - panic("no return value specified for UpdateCommand") - } - var r0 *model.Command var r1 error if rf, ok := ret.Get(0).(func(string, *model.Command) (*model.Command, error)); ok { @@ -4771,10 +4087,6 @@ func (_m *API) UpdateCommand(commandID string, updatedCmd *model.Command) (*mode func (_m *API) UpdateEphemeralPost(userID string, post *model.Post) *model.Post { ret := _m.Called(userID, post) - if len(ret) == 0 { - panic("no return value specified for UpdateEphemeralPost") - } - var r0 *model.Post if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { r0 = rf(userID, post) @@ -4791,10 +4103,6 @@ func (_m *API) UpdateEphemeralPost(userID string, post *model.Post) *model.Post func (_m *API) UpdateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) { ret := _m.Called(app) - if len(ret) == 0 { - panic("no return value specified for UpdateOAuthApp") - } - var r0 *model.OAuthApp var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)); ok { @@ -4823,10 +4131,6 @@ func (_m *API) UpdateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppE func (_m *API) UpdatePost(post *model.Post) (*model.Post, *model.AppError) { ret := _m.Called(post) - if len(ret) == 0 { - panic("no return value specified for UpdatePost") - } - var r0 *model.Post var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok { @@ -4855,10 +4159,6 @@ func (_m *API) UpdatePost(post *model.Post) (*model.Post, *model.AppError) { func (_m *API) UpdatePreferencesForUser(userID string, preferences []model.Preference) *model.AppError { ret := _m.Called(userID, preferences) - if len(ret) == 0 { - panic("no return value specified for UpdatePreferencesForUser") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, []model.Preference) *model.AppError); ok { r0 = rf(userID, preferences) @@ -4875,10 +4175,6 @@ func (_m *API) UpdatePreferencesForUser(userID string, preferences []model.Prefe func (_m *API) UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error) { ret := _m.Called(sc) - if len(ret) == 0 { - panic("no return value specified for UpdateSharedChannel") - } - var r0 *model.SharedChannel var r1 error if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { @@ -4905,10 +4201,6 @@ func (_m *API) UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChanne func (_m *API) UpdateSharedChannelCursor(channelID string, remoteID string, cusror model.GetPostsSinceForSyncCursor) error { ret := _m.Called(channelID, remoteID, cusror) - if len(ret) == 0 { - panic("no return value specified for UpdateSharedChannelCursor") - } - var r0 error if rf, ok := ret.Get(0).(func(string, string, model.GetPostsSinceForSyncCursor) error); ok { r0 = rf(channelID, remoteID, cusror) @@ -4923,10 +4215,6 @@ func (_m *API) UpdateSharedChannelCursor(channelID string, remoteID string, cusr func (_m *API) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) { ret := _m.Called(team) - if len(ret) == 0 { - panic("no return value specified for UpdateTeam") - } - var r0 *model.Team var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, *model.AppError)); ok { @@ -4955,10 +4243,6 @@ func (_m *API) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) { func (_m *API) UpdateTeamMemberRoles(teamID string, userID string, newRoles string) (*model.TeamMember, *model.AppError) { ret := _m.Called(teamID, userID, newRoles) - if len(ret) == 0 { - panic("no return value specified for UpdateTeamMemberRoles") - } - var r0 *model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string, string) (*model.TeamMember, *model.AppError)); ok { @@ -4987,10 +4271,6 @@ func (_m *API) UpdateTeamMemberRoles(teamID string, userID string, newRoles stri func (_m *API) UpdateUser(user *model.User) (*model.User, *model.AppError) { ret := _m.Called(user) - if len(ret) == 0 { - panic("no return value specified for UpdateUser") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok { @@ -5019,10 +4299,6 @@ func (_m *API) UpdateUser(user *model.User) (*model.User, *model.AppError) { func (_m *API) UpdateUserActive(userID string, active bool) *model.AppError { ret := _m.Called(userID, active) - if len(ret) == 0 { - panic("no return value specified for UpdateUserActive") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, bool) *model.AppError); ok { r0 = rf(userID, active) @@ -5039,10 +4315,6 @@ func (_m *API) UpdateUserActive(userID string, active bool) *model.AppError { func (_m *API) UpdateUserAuth(userID string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError) { ret := _m.Called(userID, userAuth) - if len(ret) == 0 { - panic("no return value specified for UpdateUserAuth") - } - var r0 *model.UserAuth var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, *model.UserAuth) (*model.UserAuth, *model.AppError)); ok { @@ -5071,10 +4343,6 @@ func (_m *API) UpdateUserAuth(userID string, userAuth *model.UserAuth) (*model.U func (_m *API) UpdateUserCustomStatus(userID string, customStatus *model.CustomStatus) *model.AppError { ret := _m.Called(userID, customStatus) - if len(ret) == 0 { - panic("no return value specified for UpdateUserCustomStatus") - } - var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, *model.CustomStatus) *model.AppError); ok { r0 = rf(userID, customStatus) @@ -5091,10 +4359,6 @@ func (_m *API) UpdateUserCustomStatus(userID string, customStatus *model.CustomS func (_m *API) UpdateUserRoles(userID string, newRoles string) (*model.User, *model.AppError) { ret := _m.Called(userID, newRoles) - if len(ret) == 0 { - panic("no return value specified for UpdateUserRoles") - } - var r0 *model.User var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.User, *model.AppError)); ok { @@ -5123,10 +4387,6 @@ func (_m *API) UpdateUserRoles(userID string, newRoles string) (*model.User, *mo func (_m *API) UpdateUserStatus(userID string, status string) (*model.Status, *model.AppError) { ret := _m.Called(userID, status) - if len(ret) == 0 { - panic("no return value specified for UpdateUserStatus") - } - var r0 *model.Status var r1 *model.AppError if rf, ok := ret.Get(0).(func(string, string) (*model.Status, *model.AppError)); ok { @@ -5155,10 +4415,6 @@ func (_m *API) UpdateUserStatus(userID string, status string) (*model.Status, *m func (_m *API) UploadData(us *model.UploadSession, rd io.Reader) (*model.FileInfo, error) { ret := _m.Called(us, rd) - if len(ret) == 0 { - panic("no return value specified for UploadData") - } - var r0 *model.FileInfo var r1 error if rf, ok := ret.Get(0).(func(*model.UploadSession, io.Reader) (*model.FileInfo, error)); ok { @@ -5185,10 +4441,6 @@ func (_m *API) UploadData(us *model.UploadSession, rd io.Reader) (*model.FileInf func (_m *API) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError) { ret := _m.Called(data, channelId, filename) - if len(ret) == 0 { - panic("no return value specified for UploadFile") - } - var r0 *model.FileInfo var r1 *model.AppError if rf, ok := ret.Get(0).(func([]byte, string, string) (*model.FileInfo, *model.AppError)); ok { @@ -5213,12 +4465,13 @@ func (_m *API) UploadFile(data []byte, channelId string, filename string) (*mode return r0, r1 } -// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewAPI(t interface { +type mockConstructorTestingTNewAPI interface { mock.TestingT Cleanup(func()) -}) *API { +} + +// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewAPI(t mockConstructorTestingTNewAPI) *API { mock := &API{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/driver.go b/server/public/plugin/plugintest/driver.go index a60971e252..25d02489e8 100644 --- a/server/public/plugin/plugintest/driver.go +++ b/server/public/plugin/plugintest/driver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -21,10 +21,6 @@ type Driver struct { func (_m *Driver) Conn(isMaster bool) (string, error) { ret := _m.Called(isMaster) - if len(ret) == 0 { - panic("no return value specified for Conn") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(bool) (string, error)); ok { @@ -49,10 +45,6 @@ func (_m *Driver) Conn(isMaster bool) (string, error) { func (_m *Driver) ConnClose(connID string) error { ret := _m.Called(connID) - if len(ret) == 0 { - panic("no return value specified for ConnClose") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(connID) @@ -67,10 +59,6 @@ func (_m *Driver) ConnClose(connID string) error { func (_m *Driver) ConnExec(connID string, q string, args []driver.NamedValue) (plugin.ResultContainer, error) { ret := _m.Called(connID, q, args) - if len(ret) == 0 { - panic("no return value specified for ConnExec") - } - var r0 plugin.ResultContainer var r1 error if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) (plugin.ResultContainer, error)); ok { @@ -95,10 +83,6 @@ func (_m *Driver) ConnExec(connID string, q string, args []driver.NamedValue) (p func (_m *Driver) ConnPing(connID string) error { ret := _m.Called(connID) - if len(ret) == 0 { - panic("no return value specified for ConnPing") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(connID) @@ -113,10 +97,6 @@ func (_m *Driver) ConnPing(connID string) error { func (_m *Driver) ConnQuery(connID string, q string, args []driver.NamedValue) (string, error) { ret := _m.Called(connID, q, args) - if len(ret) == 0 { - panic("no return value specified for ConnQuery") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) (string, error)); ok { @@ -141,10 +121,6 @@ func (_m *Driver) ConnQuery(connID string, q string, args []driver.NamedValue) ( func (_m *Driver) RowsClose(rowsID string) error { ret := _m.Called(rowsID) - if len(ret) == 0 { - panic("no return value specified for RowsClose") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(rowsID) @@ -159,10 +135,6 @@ func (_m *Driver) RowsClose(rowsID string) error { func (_m *Driver) RowsColumnTypeDatabaseTypeName(rowsID string, index int) string { ret := _m.Called(rowsID, index) - if len(ret) == 0 { - panic("no return value specified for RowsColumnTypeDatabaseTypeName") - } - var r0 string if rf, ok := ret.Get(0).(func(string, int) string); ok { r0 = rf(rowsID, index) @@ -177,10 +149,6 @@ func (_m *Driver) RowsColumnTypeDatabaseTypeName(rowsID string, index int) strin func (_m *Driver) RowsColumnTypePrecisionScale(rowsID string, index int) (int64, int64, bool) { ret := _m.Called(rowsID, index) - if len(ret) == 0 { - panic("no return value specified for RowsColumnTypePrecisionScale") - } - var r0 int64 var r1 int64 var r2 bool @@ -212,10 +180,6 @@ func (_m *Driver) RowsColumnTypePrecisionScale(rowsID string, index int) (int64, func (_m *Driver) RowsColumns(rowsID string) []string { ret := _m.Called(rowsID) - if len(ret) == 0 { - panic("no return value specified for RowsColumns") - } - var r0 []string if rf, ok := ret.Get(0).(func(string) []string); ok { r0 = rf(rowsID) @@ -232,10 +196,6 @@ func (_m *Driver) RowsColumns(rowsID string) []string { func (_m *Driver) RowsHasNextResultSet(rowsID string) bool { ret := _m.Called(rowsID) - if len(ret) == 0 { - panic("no return value specified for RowsHasNextResultSet") - } - var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(rowsID) @@ -250,10 +210,6 @@ func (_m *Driver) RowsHasNextResultSet(rowsID string) bool { func (_m *Driver) RowsNext(rowsID string, dest []driver.Value) error { ret := _m.Called(rowsID, dest) - if len(ret) == 0 { - panic("no return value specified for RowsNext") - } - var r0 error if rf, ok := ret.Get(0).(func(string, []driver.Value) error); ok { r0 = rf(rowsID, dest) @@ -268,10 +224,6 @@ func (_m *Driver) RowsNext(rowsID string, dest []driver.Value) error { func (_m *Driver) RowsNextResultSet(rowsID string) error { ret := _m.Called(rowsID) - if len(ret) == 0 { - panic("no return value specified for RowsNextResultSet") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(rowsID) @@ -286,10 +238,6 @@ func (_m *Driver) RowsNextResultSet(rowsID string) error { func (_m *Driver) Stmt(connID string, q string) (string, error) { ret := _m.Called(connID, q) - if len(ret) == 0 { - panic("no return value specified for Stmt") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { @@ -314,10 +262,6 @@ func (_m *Driver) Stmt(connID string, q string) (string, error) { func (_m *Driver) StmtClose(stID string) error { ret := _m.Called(stID) - if len(ret) == 0 { - panic("no return value specified for StmtClose") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(stID) @@ -332,10 +276,6 @@ func (_m *Driver) StmtClose(stID string) error { func (_m *Driver) StmtExec(stID string, args []driver.NamedValue) (plugin.ResultContainer, error) { ret := _m.Called(stID, args) - if len(ret) == 0 { - panic("no return value specified for StmtExec") - } - var r0 plugin.ResultContainer var r1 error if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) (plugin.ResultContainer, error)); ok { @@ -360,10 +300,6 @@ func (_m *Driver) StmtExec(stID string, args []driver.NamedValue) (plugin.Result func (_m *Driver) StmtNumInput(stID string) int { ret := _m.Called(stID) - if len(ret) == 0 { - panic("no return value specified for StmtNumInput") - } - var r0 int if rf, ok := ret.Get(0).(func(string) int); ok { r0 = rf(stID) @@ -378,10 +314,6 @@ func (_m *Driver) StmtNumInput(stID string) int { func (_m *Driver) StmtQuery(stID string, args []driver.NamedValue) (string, error) { ret := _m.Called(stID, args) - if len(ret) == 0 { - panic("no return value specified for StmtQuery") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) (string, error)); ok { @@ -406,10 +338,6 @@ func (_m *Driver) StmtQuery(stID string, args []driver.NamedValue) (string, erro func (_m *Driver) Tx(connID string, opts driver.TxOptions) (string, error) { ret := _m.Called(connID, opts) - if len(ret) == 0 { - panic("no return value specified for Tx") - } - var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, driver.TxOptions) (string, error)); ok { @@ -434,10 +362,6 @@ func (_m *Driver) Tx(connID string, opts driver.TxOptions) (string, error) { func (_m *Driver) TxCommit(txID string) error { ret := _m.Called(txID) - if len(ret) == 0 { - panic("no return value specified for TxCommit") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(txID) @@ -452,10 +376,6 @@ func (_m *Driver) TxCommit(txID string) error { func (_m *Driver) TxRollback(txID string) error { ret := _m.Called(txID) - if len(ret) == 0 { - panic("no return value specified for TxRollback") - } - var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(txID) @@ -466,12 +386,13 @@ func (_m *Driver) TxRollback(txID string) error { return r0 } -// NewDriver creates a new instance of Driver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDriver(t interface { +type mockConstructorTestingTNewDriver interface { mock.TestingT Cleanup(func()) -}) *Driver { +} + +// NewDriver creates a new instance of Driver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDriver(t mockConstructorTestingTNewDriver) *Driver { mock := &Driver{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/hooks.go b/server/public/plugin/plugintest/hooks.go index 2586588a6d..3846798913 100644 --- a/server/public/plugin/plugintest/hooks.go +++ b/server/public/plugin/plugintest/hooks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.23.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -29,10 +29,6 @@ func (_m *Hooks) ChannelHasBeenCreated(c *plugin.Context, channel *model.Channel func (_m *Hooks) ConfigurationWillBeSaved(newCfg *model.Config) (*model.Config, error) { ret := _m.Called(newCfg) - if len(ret) == 0 { - panic("no return value specified for ConfigurationWillBeSaved") - } - var r0 *model.Config var r1 error if rf, ok := ret.Get(0).(func(*model.Config) (*model.Config, error)); ok { @@ -59,10 +55,6 @@ func (_m *Hooks) ConfigurationWillBeSaved(newCfg *model.Config) (*model.Config, func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) { ret := _m.Called(c, args) - if len(ret) == 0 { - panic("no return value specified for ExecuteCommand") - } - var r0 *model.CommandResponse var r1 *model.AppError if rf, ok := ret.Get(0).(func(*plugin.Context, *model.CommandArgs) (*model.CommandResponse, *model.AppError)); ok { @@ -91,10 +83,6 @@ func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*mo func (_m *Hooks) FileWillBeUploaded(c *plugin.Context, info *model.FileInfo, file io.Reader, output io.Writer) (*model.FileInfo, string) { ret := _m.Called(c, info, file, output) - if len(ret) == 0 { - panic("no return value specified for FileWillBeUploaded") - } - var r0 *model.FileInfo var r1 string if rf, ok := ret.Get(0).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) (*model.FileInfo, string)); ok { @@ -147,10 +135,6 @@ func (_m *Hooks) GenerateSupportData(c *plugin.Context) ([]*model.FileData, erro func (_m *Hooks) Implemented() ([]string, error) { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for Implemented") - } - var r0 []string var r1 error if rf, ok := ret.Get(0).(func() ([]string, error)); ok { @@ -192,10 +176,6 @@ func (_m *Hooks) MessageHasBeenUpdated(c *plugin.Context, newPost *model.Post, o func (_m *Hooks) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string) { ret := _m.Called(c, post) - if len(ret) == 0 { - panic("no return value specified for MessageWillBePosted") - } - var r0 *model.Post var r1 string if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post) (*model.Post, string)); ok { @@ -222,10 +202,6 @@ func (_m *Hooks) MessageWillBePosted(c *plugin.Context, post *model.Post) (*mode func (_m *Hooks) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, oldPost *model.Post) (*model.Post, string) { ret := _m.Called(c, newPost, oldPost) - if len(ret) == 0 { - panic("no return value specified for MessageWillBeUpdated") - } - var r0 *model.Post var r1 string if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post, *model.Post) (*model.Post, string)); ok { @@ -252,10 +228,6 @@ func (_m *Hooks) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, ol func (_m *Hooks) MessagesWillBeConsumed(posts []*model.Post) []*model.Post { ret := _m.Called(posts) - if len(ret) == 0 { - panic("no return value specified for MessagesWillBeConsumed") - } - var r0 []*model.Post if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok { r0 = rf(posts) @@ -272,10 +244,6 @@ func (_m *Hooks) MessagesWillBeConsumed(posts []*model.Post) []*model.Post { func (_m *Hooks) NotificationWillBePushed(pushNotification *model.PushNotification, userID string) (*model.PushNotification, string) { ret := _m.Called(pushNotification, userID) - if len(ret) == 0 { - panic("no return value specified for NotificationWillBePushed") - } - var r0 *model.PushNotification var r1 string if rf, ok := ret.Get(0).(func(*model.PushNotification, string) (*model.PushNotification, string)); ok { @@ -302,10 +270,6 @@ func (_m *Hooks) NotificationWillBePushed(pushNotification *model.PushNotificati func (_m *Hooks) OnActivate() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for OnActivate") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -325,10 +289,6 @@ func (_m *Hooks) OnCloudLimitsUpdated(limits *model.ProductLimits) { func (_m *Hooks) OnConfigurationChange() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for OnConfigurationChange") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -343,10 +303,6 @@ func (_m *Hooks) OnConfigurationChange() error { func (_m *Hooks) OnDeactivate() error { ret := _m.Called() - if len(ret) == 0 { - panic("no return value specified for OnDeactivate") - } - var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -361,10 +317,6 @@ func (_m *Hooks) OnDeactivate() error { func (_m *Hooks) OnInstall(c *plugin.Context, event model.OnInstallEvent) error { ret := _m.Called(c, event) - if len(ret) == 0 { - panic("no return value specified for OnInstall") - } - var r0 error if rf, ok := ret.Get(0).(func(*plugin.Context, model.OnInstallEvent) error); ok { r0 = rf(c, event) @@ -389,10 +341,6 @@ func (_m *Hooks) OnSendDailyTelemetry() { func (_m *Hooks) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error { ret := _m.Called(fi, post, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsAttachmentSyncMsg") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.FileInfo, *model.Post, *model.RemoteCluster) error); ok { r0 = rf(fi, post, rc) @@ -407,10 +355,6 @@ func (_m *Hooks) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *mod func (_m *Hooks) OnSharedChannelsPing(rc *model.RemoteCluster) bool { ret := _m.Called(rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsPing") - } - var r0 bool if rf, ok := ret.Get(0).(func(*model.RemoteCluster) bool); ok { r0 = rf(rc) @@ -425,10 +369,6 @@ func (_m *Hooks) OnSharedChannelsPing(rc *model.RemoteCluster) bool { func (_m *Hooks) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error { ret := _m.Called(user, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsProfileImageSyncMsg") - } - var r0 error if rf, ok := ret.Get(0).(func(*model.User, *model.RemoteCluster) error); ok { r0 = rf(user, rc) @@ -443,10 +383,6 @@ func (_m *Hooks) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model func (_m *Hooks) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error) { ret := _m.Called(msg, rc) - if len(ret) == 0 { - panic("no return value specified for OnSharedChannelsSyncMsg") - } - var r0 model.SyncResponse var r1 error if rf, ok := ret.Get(0).(func(*model.SyncMsg, *model.RemoteCluster) (model.SyncResponse, error)); ok { @@ -496,10 +432,6 @@ func (_m *Hooks) ReactionHasBeenRemoved(c *plugin.Context, reaction *model.React func (_m *Hooks) RunDataRetention(nowTime int64, batchSize int64) (int64, error) { ret := _m.Called(nowTime, batchSize) - if len(ret) == 0 { - panic("no return value specified for RunDataRetention") - } - var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok { @@ -569,10 +501,6 @@ func (_m *Hooks) UserHasLoggedIn(c *plugin.Context, user *model.User) { func (_m *Hooks) UserWillLogIn(c *plugin.Context, user *model.User) string { ret := _m.Called(c, user) - if len(ret) == 0 { - panic("no return value specified for UserWillLogIn") - } - var r0 string if rf, ok := ret.Get(0).(func(*plugin.Context, *model.User) string); ok { r0 = rf(c, user) @@ -588,12 +516,13 @@ func (_m *Hooks) WebSocketMessageHasBeenPosted(webConnID string, userID string, _m.Called(webConnID, userID, req) } -// NewHooks creates a new instance of Hooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewHooks(t interface { +type mockConstructorTestingTNewHooks interface { mock.TestingT Cleanup(func()) -}) *Hooks { +} + +// NewHooks creates a new instance of Hooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewHooks(t mockConstructorTestingTNewHooks) *Hooks { mock := &Hooks{} mock.Mock.Test(t)