From 98712737e600e8b11e7d72ea90faa266227aa855 Mon Sep 17 00:00:00 2001 From: Ezekiel Date: Fri, 12 Apr 2024 16:38:34 +0800 Subject: [PATCH] MM-57759: Bump mockery to version 2.42.2 to support go 1.22^ (#26761) --- 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, 5378 insertions(+), 504 deletions(-) diff --git a/server/Makefile b/server/Makefile index b73bee82d3..28ace170c2 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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.23.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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.32.2 + $(GO) install github.com/vektra/mockery/v2/...@v2.42.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 ea78445a1a..8a8ee01420 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make email-mocks`. @@ -29,6 +29,10 @@ 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) @@ -45,6 +49,10 @@ 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 { @@ -71,6 +79,10 @@ 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 { @@ -95,6 +107,10 @@ 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) @@ -109,6 +125,10 @@ 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() @@ -130,6 +150,10 @@ 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) @@ -144,6 +168,10 @@ 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) @@ -158,6 +186,10 @@ 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) @@ -172,6 +204,10 @@ 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) @@ -186,6 +222,10 @@ 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) @@ -200,6 +240,10 @@ 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) @@ -214,6 +258,10 @@ 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) @@ -228,6 +276,10 @@ 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) @@ -242,6 +294,10 @@ 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) @@ -256,6 +312,10 @@ 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) @@ -270,6 +330,10 @@ 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) @@ -284,6 +348,10 @@ 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) @@ -298,6 +366,10 @@ 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) @@ -312,6 +384,10 @@ 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) @@ -326,6 +402,10 @@ 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) @@ -340,6 +420,10 @@ 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) @@ -354,6 +438,10 @@ 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) @@ -368,6 +456,10 @@ 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) @@ -382,6 +474,10 @@ 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) @@ -396,6 +492,10 @@ 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) @@ -410,6 +510,10 @@ 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 { @@ -436,6 +540,10 @@ 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) @@ -450,6 +558,10 @@ 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) @@ -464,6 +576,10 @@ 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) @@ -478,6 +594,10 @@ 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) @@ -492,6 +612,10 @@ 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) @@ -506,6 +630,10 @@ 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) @@ -520,6 +648,10 @@ 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 { @@ -544,6 +676,10 @@ 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 { @@ -568,6 +704,10 @@ 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) @@ -582,6 +722,10 @@ 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) @@ -596,6 +740,10 @@ 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) @@ -610,6 +758,10 @@ 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) @@ -624,6 +776,10 @@ 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) @@ -644,13 +800,12 @@ func (_m *ServiceInterface) Stop() { _m.Called() } -type mockConstructorTestingTNewServiceInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 6bcadc2285..b8faabdfb1 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.32.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make platform-mocks`. @@ -20,6 +20,10 @@ 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 { @@ -48,6 +52,10 @@ 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) @@ -62,6 +70,10 @@ 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 63a8d25497..addeae46fb 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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) @@ -58,6 +66,10 @@ 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) @@ -68,13 +80,12 @@ func (_m *AuditStore) Save(audit *model.Audit) error { return r0 } -type mockConstructorTestingTNewAuditStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 da0140e85c..83d3a82fd7 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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) @@ -84,6 +96,10 @@ 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 { @@ -110,6 +126,10 @@ 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 { @@ -132,13 +152,12 @@ func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) { return r0, r1 } -type mockConstructorTestingTNewBotStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 231167ce37..bc1ecb9cf0 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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 { @@ -72,6 +84,10 @@ 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 { @@ -98,6 +114,10 @@ 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 { @@ -124,6 +144,10 @@ 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) @@ -138,6 +162,10 @@ 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 { @@ -160,13 +188,12 @@ func (_m *ChannelBookmarkStore) UpdateSortOrder(bookmarkId string, channelId str return r0, r1 } -type mockConstructorTestingTNewChannelBookmarkStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 14b37d2e71..68139fdb94 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -68,6 +76,10 @@ 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 { @@ -94,6 +106,10 @@ 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) @@ -108,6 +124,10 @@ 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) @@ -122,6 +142,10 @@ 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 { @@ -146,6 +170,10 @@ 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 @@ -173,13 +201,12 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatchForRetentionPolicies(no return r0, r1, r2 } -type mockConstructorTestingTNewChannelMemberHistoryStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 a2fa85bbc0..d31c350637 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,6 +24,10 @@ 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 { @@ -48,6 +52,10 @@ 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 { @@ -72,6 +80,10 @@ 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 { @@ -98,6 +110,10 @@ 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 { @@ -124,6 +140,10 @@ 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 { @@ -150,6 +170,10 @@ 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() @@ -174,6 +198,10 @@ 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) @@ -188,6 +216,10 @@ 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 @@ -219,6 +251,10 @@ 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 { @@ -250,6 +286,10 @@ 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 { @@ -276,6 +316,10 @@ 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 { @@ -302,6 +346,10 @@ 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 { @@ -328,6 +376,10 @@ 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) @@ -342,6 +394,10 @@ 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) @@ -356,6 +412,10 @@ 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) @@ -370,6 +430,10 @@ 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) @@ -384,6 +448,10 @@ 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 { @@ -410,6 +478,10 @@ 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 { @@ -436,6 +508,10 @@ 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 { @@ -462,6 +538,10 @@ 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 { @@ -488,6 +568,10 @@ 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 { @@ -514,6 +598,10 @@ 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 { @@ -540,6 +628,10 @@ 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 { @@ -564,6 +656,10 @@ 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 { @@ -590,6 +686,10 @@ 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 { @@ -616,6 +716,10 @@ 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 { @@ -642,6 +746,10 @@ 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 { @@ -668,6 +776,10 @@ 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 { @@ -694,6 +806,10 @@ 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 { @@ -720,6 +836,10 @@ 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 { @@ -746,6 +866,10 @@ 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 { @@ -772,6 +896,10 @@ 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 { @@ -798,6 +926,10 @@ 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 { @@ -824,6 +956,10 @@ 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 { @@ -850,6 +986,10 @@ 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 { @@ -876,6 +1016,10 @@ 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 { @@ -902,6 +1046,10 @@ 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 { @@ -928,6 +1076,10 @@ 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 { @@ -954,6 +1106,10 @@ 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 { @@ -980,6 +1136,10 @@ 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 { @@ -1006,6 +1166,10 @@ 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 @@ -1050,6 +1214,10 @@ 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 { @@ -1076,6 +1244,10 @@ 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 { @@ -1102,6 +1274,10 @@ 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 { @@ -1126,6 +1302,10 @@ 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 { @@ -1152,6 +1332,10 @@ 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 { @@ -1176,6 +1360,10 @@ 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 { @@ -1202,6 +1390,10 @@ 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 { @@ -1228,6 +1420,10 @@ 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 { @@ -1252,6 +1448,10 @@ 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) @@ -1266,6 +1466,10 @@ 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 { @@ -1292,6 +1496,10 @@ 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 { @@ -1318,6 +1526,10 @@ 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 { @@ -1342,6 +1554,10 @@ 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 { @@ -1368,6 +1584,10 @@ 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 { @@ -1394,6 +1614,10 @@ 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 { @@ -1420,6 +1644,10 @@ 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 { @@ -1446,6 +1674,10 @@ 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 { @@ -1472,6 +1704,10 @@ 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 { @@ -1498,6 +1734,10 @@ 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 { @@ -1524,6 +1764,10 @@ 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 { @@ -1548,6 +1792,10 @@ 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 { @@ -1574,6 +1822,10 @@ 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 { @@ -1600,6 +1852,10 @@ 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 { @@ -1626,6 +1882,10 @@ 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 { @@ -1652,6 +1912,10 @@ 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 { @@ -1678,6 +1942,10 @@ 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 { @@ -1704,6 +1972,10 @@ 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 { @@ -1730,6 +2002,10 @@ 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 { @@ -1756,6 +2032,10 @@ 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 { @@ -1782,6 +2062,10 @@ 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 { @@ -1808,6 +2092,10 @@ 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 { @@ -1834,6 +2122,10 @@ 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 { @@ -1858,6 +2150,10 @@ 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) @@ -1907,6 +2203,10 @@ 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 { @@ -1933,6 +2233,10 @@ 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 { @@ -1959,6 +2263,10 @@ 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) @@ -1973,6 +2281,10 @@ 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) @@ -1987,6 +2299,10 @@ 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) @@ -2001,6 +2317,10 @@ 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) @@ -2015,6 +2335,10 @@ 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) @@ -2029,6 +2353,10 @@ 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) @@ -2043,6 +2371,10 @@ 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) @@ -2057,6 +2389,10 @@ 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() @@ -2071,6 +2407,10 @@ 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) @@ -2085,6 +2425,10 @@ 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 { @@ -2111,6 +2455,10 @@ 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 { @@ -2137,6 +2485,10 @@ 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 { @@ -2163,6 +2515,10 @@ 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 { @@ -2189,6 +2545,10 @@ 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 @@ -2222,6 +2582,10 @@ 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 { @@ -2248,6 +2612,10 @@ 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 { @@ -2274,6 +2642,10 @@ 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 { @@ -2300,6 +2672,10 @@ 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 { @@ -2326,6 +2702,10 @@ 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 { @@ -2352,6 +2732,10 @@ 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) @@ -2366,6 +2750,10 @@ 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) @@ -2380,6 +2768,10 @@ 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 { @@ -2406,6 +2798,10 @@ 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 { @@ -2432,6 +2828,10 @@ 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 { @@ -2458,6 +2858,10 @@ 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 { @@ -2484,6 +2888,10 @@ 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 { @@ -2510,6 +2918,10 @@ 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) @@ -2524,6 +2936,10 @@ 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 { @@ -2550,6 +2966,10 @@ 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 @@ -2585,6 +3005,10 @@ 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) @@ -2599,6 +3023,10 @@ 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) @@ -2613,6 +3041,10 @@ 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) @@ -2627,6 +3059,10 @@ 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 { @@ -2647,13 +3083,12 @@ func (_m *ChannelStore) UserBelongsToChannels(userID string, channelIds []string return r0, r1 } -type mockConstructorTestingTNewChannelStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 3f6a41de03..0c20c7efa0 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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() @@ -32,6 +36,10 @@ 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 { @@ -56,6 +64,10 @@ 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 { @@ -80,6 +92,10 @@ 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 { @@ -106,6 +122,10 @@ 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) @@ -120,6 +140,10 @@ 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) @@ -130,13 +154,12 @@ func (_m *ClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery return r0 } -type mockConstructorTestingTNewClusterDiscoveryStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 09f4f52f76..75bdcd6a8a 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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) @@ -56,6 +64,10 @@ 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 { @@ -82,6 +94,10 @@ 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 { @@ -108,6 +124,10 @@ 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 { @@ -134,6 +154,10 @@ 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) @@ -148,6 +172,10 @@ 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) @@ -162,6 +190,10 @@ 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 { @@ -188,6 +220,10 @@ 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 { @@ -210,13 +246,12 @@ func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) { return r0, r1 } -type mockConstructorTestingTNewCommandStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 09845d74e9..a24d2589d7 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -23,6 +23,10 @@ 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 { @@ -49,6 +53,10 @@ 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 { @@ -75,6 +83,10 @@ 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) @@ -85,13 +97,12 @@ func (_m *CommandWebhookStore) TryUse(id string, limit int) error { return r0 } -type mockConstructorTestingTNewCommandWebhookStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 ecd1a0e070..9976367d97 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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 @@ -52,6 +56,10 @@ 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 { @@ -78,6 +86,10 @@ 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 { @@ -104,6 +116,10 @@ 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 @@ -137,6 +153,10 @@ 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 { @@ -163,6 +183,10 @@ 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 { @@ -185,13 +209,12 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian return r0, r1 } -type mockConstructorTestingTNewComplianceStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 53412238be..84d3a9ee65 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -15,6 +15,10 @@ 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) @@ -29,6 +33,10 @@ 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) @@ -43,6 +51,10 @@ 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) @@ -57,6 +69,10 @@ 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 { @@ -83,6 +99,10 @@ 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) @@ -93,13 +113,12 @@ func (_m *DesktopTokensStore) Insert(token string, createAt int64, userId string return r0 } -type mockConstructorTestingTNewDesktopTokensStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 e6890f8829..c7309bcbbf 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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) @@ -60,6 +72,10 @@ 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) @@ -74,6 +90,10 @@ 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 { @@ -100,6 +120,10 @@ 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 { @@ -126,6 +150,10 @@ 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 @@ -157,6 +185,10 @@ 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 { @@ -179,13 +211,12 @@ func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) { return r0, r1 } -type mockConstructorTestingTNewDraftStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 1e830a15a4..9a89cd4697 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -33,6 +37,10 @@ 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 { @@ -59,6 +67,10 @@ 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 { @@ -85,6 +97,10 @@ 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 { @@ -111,6 +127,10 @@ 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 { @@ -137,6 +157,10 @@ 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 { @@ -163,6 +187,10 @@ 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 { @@ -185,13 +213,12 @@ func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model. return r0, r1 } -type mockConstructorTestingTNewEmojiStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 3c00bd6285..71231ea3ce 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -38,6 +42,10 @@ 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 { @@ -62,6 +70,10 @@ 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 { @@ -86,6 +98,10 @@ 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 { @@ -112,6 +128,10 @@ 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 { @@ -138,6 +158,10 @@ 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 { @@ -164,6 +188,10 @@ 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 { @@ -190,6 +218,10 @@ 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 { @@ -216,6 +248,10 @@ 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 { @@ -242,6 +278,10 @@ 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 { @@ -268,6 +308,10 @@ 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 { @@ -292,6 +336,10 @@ 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 { @@ -316,6 +364,10 @@ 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 { @@ -347,6 +399,10 @@ 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) @@ -361,6 +417,10 @@ 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 { @@ -385,6 +445,10 @@ 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 { @@ -409,6 +473,10 @@ 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 { @@ -435,6 +503,10 @@ 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 { @@ -461,6 +533,10 @@ 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) @@ -475,6 +551,10 @@ 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 { @@ -497,13 +577,12 @@ func (_m *FileInfoStore) Upsert(rctx request.CTX, info *model.FileInfo) (*model. return r0, r1 } -type mockConstructorTestingTNewFileInfoStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 40b45cb805..d3b90728b4 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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 { @@ -96,6 +108,10 @@ 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 { @@ -122,6 +138,10 @@ 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 { @@ -146,6 +166,10 @@ 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 { @@ -170,6 +194,10 @@ 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 { @@ -194,6 +222,10 @@ 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 { @@ -218,6 +250,10 @@ 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 { @@ -244,6 +280,10 @@ 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 { @@ -270,6 +310,10 @@ 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 { @@ -296,6 +340,10 @@ 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 { @@ -322,6 +370,10 @@ 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 { @@ -348,6 +400,10 @@ 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 { @@ -374,6 +430,10 @@ 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 { @@ -400,6 +460,10 @@ 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 { @@ -424,6 +488,10 @@ 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 { @@ -448,6 +516,10 @@ 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 { @@ -474,6 +546,10 @@ 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 { @@ -500,6 +576,10 @@ 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 { @@ -526,6 +606,10 @@ 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 { @@ -552,6 +636,10 @@ 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 { @@ -578,6 +666,10 @@ 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 { @@ -604,6 +696,10 @@ 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 { @@ -630,6 +726,10 @@ 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 { @@ -656,6 +756,10 @@ 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 { @@ -682,6 +786,10 @@ 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 { @@ -708,6 +816,10 @@ 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 { @@ -734,6 +846,10 @@ 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 { @@ -760,6 +876,10 @@ 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 { @@ -786,6 +906,10 @@ 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 { @@ -810,6 +934,10 @@ 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 { @@ -834,6 +962,10 @@ 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 { @@ -860,6 +992,10 @@ 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 { @@ -886,6 +1022,10 @@ 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 { @@ -912,6 +1052,10 @@ 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 { @@ -938,6 +1082,10 @@ 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 { @@ -964,6 +1112,10 @@ 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 { @@ -990,6 +1142,10 @@ 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 { @@ -1014,6 +1170,10 @@ 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 { @@ -1038,6 +1198,10 @@ 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 { @@ -1062,6 +1226,10 @@ 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 { @@ -1086,6 +1254,10 @@ 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 { @@ -1110,6 +1282,10 @@ 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 { @@ -1134,6 +1310,10 @@ 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) @@ -1148,6 +1328,10 @@ 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 { @@ -1174,6 +1358,10 @@ 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 { @@ -1200,6 +1388,10 @@ 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 { @@ -1226,6 +1418,10 @@ 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 { @@ -1252,6 +1448,10 @@ 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 { @@ -1278,6 +1478,10 @@ 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 { @@ -1304,6 +1508,10 @@ 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 { @@ -1330,6 +1538,10 @@ 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 { @@ -1356,6 +1568,10 @@ 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 { @@ -1378,13 +1594,12 @@ func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model. return r0, r1 } -type mockConstructorTestingTNewGroupStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 ec9850fafd..3f05f44b4e 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -33,6 +37,10 @@ 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 { @@ -57,6 +65,10 @@ 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 { @@ -83,6 +95,10 @@ 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 { @@ -109,6 +125,10 @@ 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 { @@ -135,6 +155,10 @@ 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 { @@ -161,6 +185,10 @@ 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 { @@ -187,6 +215,10 @@ 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 { @@ -213,6 +245,10 @@ 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 { @@ -237,6 +273,10 @@ 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 { @@ -263,6 +303,10 @@ 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 { @@ -289,6 +333,10 @@ 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 { @@ -315,6 +363,10 @@ 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 { @@ -341,6 +393,10 @@ 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 { @@ -365,6 +421,10 @@ 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 { @@ -391,6 +451,10 @@ 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 { @@ -411,13 +475,12 @@ func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string, return r0, r1 } -type mockConstructorTestingTNewJobStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 2f765dbaf4..92d203f6a1 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -45,6 +49,10 @@ 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 { @@ -71,6 +79,10 @@ 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) @@ -81,13 +93,12 @@ func (_m *LicenseStore) Save(license *model.LicenseRecord) error { return r0 } -type mockConstructorTestingTNewLicenseStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 a7224bc575..0ede5086b6 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -66,13 +74,12 @@ func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.Link return r0, r1 } -type mockConstructorTestingTNewLinkMetadataStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 53027f8b52..e6b1349112 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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 { @@ -58,6 +66,10 @@ 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 { @@ -84,6 +96,10 @@ 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 { @@ -110,6 +126,10 @@ 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) @@ -120,13 +140,12 @@ func (_m *NotifyAdminStore) Update(userId string, requiredPlan string, requiredF return r0 } -type mockConstructorTestingTNewNotifyAdminStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 080b23236e..a73b019989 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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 { @@ -58,6 +66,10 @@ 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 { @@ -84,6 +96,10 @@ 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 { @@ -110,6 +126,10 @@ 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 { @@ -136,6 +156,10 @@ 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 { @@ -162,6 +186,10 @@ 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 { @@ -188,6 +216,10 @@ 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 { @@ -214,6 +246,10 @@ 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 { @@ -240,6 +276,10 @@ 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 { @@ -266,6 +306,10 @@ 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) @@ -280,6 +324,10 @@ 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) @@ -294,6 +342,10 @@ 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() @@ -308,6 +360,10 @@ 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) @@ -322,6 +378,10 @@ 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) @@ -336,6 +396,10 @@ 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) @@ -350,6 +414,10 @@ 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 { @@ -376,6 +444,10 @@ 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 { @@ -402,6 +474,10 @@ 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 { @@ -428,6 +504,10 @@ 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 { @@ -454,6 +534,10 @@ 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 { @@ -476,13 +560,12 @@ func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) { return r0, r1 } -type mockConstructorTestingTNewOAuthStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 b02612f79b..3942550bcc 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -33,6 +37,10 @@ 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 { @@ -59,6 +67,10 @@ 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 { @@ -85,6 +97,10 @@ 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 { @@ -111,6 +127,10 @@ 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 { @@ -133,13 +153,12 @@ func (_m *OutgoingOAuthConnectionStore) UpdateConnection(c request.CTX, conn *mo return r0, r1 } -type mockConstructorTestingTNewOutgoingOAuthConnectionStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 d14c45295f..d0d0b82924 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -66,6 +74,10 @@ 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) @@ -80,6 +92,10 @@ 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() @@ -94,6 +110,10 @@ 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) @@ -108,6 +128,10 @@ 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 { @@ -134,6 +158,10 @@ 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 { @@ -160,6 +188,10 @@ 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 { @@ -186,6 +218,10 @@ 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 { @@ -206,13 +242,12 @@ func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte, return r0, r1 } -type mockConstructorTestingTNewPluginStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 637fdfa317..65700fcc36 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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 { @@ -58,6 +66,10 @@ 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 { @@ -84,6 +96,10 @@ 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 { @@ -110,6 +126,10 @@ 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 { @@ -132,13 +152,12 @@ func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowled return r0, r1 } -type mockConstructorTestingTNewPostAcknowledgementStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 b616516d7d..1792932eec 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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) @@ -60,6 +72,10 @@ 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) @@ -74,6 +90,10 @@ 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 { @@ -100,6 +120,10 @@ 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 { @@ -126,6 +150,10 @@ 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) @@ -136,13 +164,12 @@ func (_m *PostPersistentNotificationStore) UpdateLastActivity(postIds []string) return r0 } -type mockConstructorTestingTNewPostPersistentNotificationStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 7192385ada..c4a0deb0e4 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -66,13 +74,12 @@ func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, e return r0, r1 } -type mockConstructorTestingTNewPostPriorityStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 786affd151..871adc49ca 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,6 +24,10 @@ 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 { @@ -48,6 +52,10 @@ 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 { @@ -74,6 +82,10 @@ 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 { @@ -105,6 +117,10 @@ 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) @@ -119,6 +135,10 @@ 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 { @@ -145,6 +165,10 @@ 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 { @@ -171,6 +195,10 @@ 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 { @@ -197,6 +225,10 @@ 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) @@ -211,6 +243,10 @@ 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 { @@ -237,6 +273,10 @@ 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 { @@ -263,6 +303,10 @@ 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 { @@ -289,6 +333,10 @@ 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() @@ -303,6 +351,10 @@ 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 { @@ -327,6 +379,10 @@ 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 { @@ -353,6 +409,10 @@ 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 { @@ -377,6 +437,10 @@ 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 { @@ -403,6 +467,10 @@ 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 { @@ -429,6 +497,10 @@ 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 { @@ -453,6 +525,10 @@ 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 { @@ -477,6 +553,10 @@ 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 { @@ -503,6 +583,10 @@ 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 { @@ -529,6 +613,10 @@ 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 { @@ -555,6 +643,10 @@ 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 { @@ -581,6 +673,10 @@ 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 { @@ -607,6 +703,10 @@ 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 { @@ -633,6 +733,10 @@ 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 { @@ -659,6 +763,10 @@ 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 { @@ -685,6 +793,10 @@ 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 { @@ -711,6 +823,10 @@ 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 { @@ -737,6 +853,10 @@ 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 @@ -770,6 +890,10 @@ 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 { @@ -796,6 +920,10 @@ 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 { @@ -822,6 +950,10 @@ 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 { @@ -851,6 +983,10 @@ 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 { @@ -877,6 +1013,10 @@ 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 @@ -910,6 +1050,10 @@ 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 { @@ -934,6 +1078,10 @@ 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 @@ -965,6 +1113,10 @@ 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) @@ -979,6 +1131,10 @@ 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) @@ -993,6 +1149,10 @@ 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 { @@ -1019,6 +1179,10 @@ 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 @@ -1052,6 +1216,10 @@ 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 { @@ -1078,6 +1246,10 @@ 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 { @@ -1104,6 +1276,10 @@ 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) @@ -1118,6 +1294,10 @@ 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 { @@ -1140,13 +1320,12 @@ func (_m *PostStore) Update(rctx request.CTX, newPost *model.Post, oldPost *mode return r0, r1 } -type mockConstructorTestingTNewPostStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 df570597dc..9f0a1f9eaa 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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) @@ -56,6 +64,10 @@ 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) @@ -70,6 +82,10 @@ 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) @@ -84,6 +100,10 @@ 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 { @@ -108,6 +128,10 @@ 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 { @@ -134,6 +158,10 @@ 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 { @@ -160,6 +188,10 @@ 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 { @@ -186,6 +218,10 @@ 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 { @@ -212,6 +248,10 @@ 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) @@ -226,6 +266,10 @@ 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) @@ -236,13 +280,12 @@ func (_m *PreferenceStore) Save(preferences model.Preferences) error { return r0 } -type mockConstructorTestingTNewPreferenceStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 3cd63083e7..8a978caf6c 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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 { @@ -72,6 +84,10 @@ 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) @@ -82,13 +98,12 @@ func (_m *ProductNoticesStore) View(userID string, notices []string) error { return r0 } -type mockConstructorTestingTNewProductNoticesStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 aa023b3b29..8dd77aa518 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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) @@ -84,6 +96,10 @@ 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) @@ -98,6 +114,10 @@ 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 { @@ -122,6 +142,10 @@ 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 { @@ -148,6 +172,10 @@ 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 { @@ -174,6 +202,10 @@ 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 { @@ -198,6 +230,10 @@ 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 { @@ -222,6 +258,10 @@ 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) @@ -236,6 +276,10 @@ 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 { @@ -258,13 +302,12 @@ func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error) return r0, r1 } -type mockConstructorTestingTNewReactionStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 f9c29193d4..c44bebd37a 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -68,6 +76,10 @@ 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 { @@ -94,6 +106,10 @@ 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 { @@ -120,6 +136,10 @@ 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 { @@ -146,6 +166,10 @@ 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) @@ -160,6 +184,10 @@ 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 { @@ -186,6 +214,10 @@ 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 { @@ -208,13 +240,12 @@ func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string return r0, r1 } -type mockConstructorTestingTNewRemoteClusterStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 fa20e4b5c9..752b1efae0 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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) @@ -60,6 +72,10 @@ 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 { @@ -84,6 +100,10 @@ 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 { @@ -110,6 +130,10 @@ 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 { @@ -136,6 +160,10 @@ 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 { @@ -160,6 +188,10 @@ 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 { @@ -186,6 +218,10 @@ 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 { @@ -212,6 +248,10 @@ 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 { @@ -236,6 +276,10 @@ 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 { @@ -260,6 +304,10 @@ 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 { @@ -286,6 +334,10 @@ 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 { @@ -310,6 +362,10 @@ 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 { @@ -336,6 +392,10 @@ 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 { @@ -362,6 +422,10 @@ 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 { @@ -386,6 +450,10 @@ 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 { @@ -412,6 +480,10 @@ 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) @@ -426,6 +498,10 @@ 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) @@ -440,6 +516,10 @@ 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 { @@ -462,13 +542,12 @@ func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndCha return r0, r1 } -type mockConstructorTestingTNewRetentionPolicyStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 f24a4e0416..f31a860673 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -20,6 +20,10 @@ 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 { @@ -46,6 +50,10 @@ 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 { @@ -72,6 +80,10 @@ 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 { @@ -98,6 +110,10 @@ 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 { @@ -124,6 +140,10 @@ 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 { @@ -150,6 +170,10 @@ 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 { @@ -176,6 +200,10 @@ 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 { @@ -202,6 +230,10 @@ 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 { @@ -228,6 +260,10 @@ 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() @@ -242,6 +278,10 @@ 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 { @@ -264,13 +304,12 @@ func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) { return r0, r1 } -type mockConstructorTestingTNewRoleStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 0dabbdb140..443d8d1b0e 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -66,6 +74,10 @@ 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 { @@ -92,6 +104,10 @@ 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 { @@ -118,6 +134,10 @@ 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 { @@ -144,6 +164,10 @@ 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 { @@ -170,6 +194,10 @@ 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() @@ -184,6 +212,10 @@ 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 { @@ -206,13 +238,12 @@ func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) { return r0, r1 } -type mockConstructorTestingTNewSchemeStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 f658d1c72a..590aef856d 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -43,6 +47,10 @@ 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) @@ -57,6 +65,10 @@ 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 { @@ -83,6 +95,10 @@ 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 { @@ -109,6 +125,10 @@ 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 { @@ -135,6 +155,10 @@ 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 { @@ -161,6 +185,10 @@ 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 { @@ -187,6 +215,10 @@ 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) @@ -201,6 +233,10 @@ 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) @@ -215,6 +251,10 @@ 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() @@ -229,6 +269,10 @@ 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 { @@ -255,6 +299,10 @@ 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 { @@ -279,6 +327,10 @@ 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) @@ -293,6 +345,10 @@ 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) @@ -307,6 +363,10 @@ 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) @@ -321,6 +381,10 @@ 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) @@ -335,6 +399,10 @@ 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 { @@ -355,13 +423,12 @@ func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error) return r0, r1 } -type mockConstructorTestingTNewSessionStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 ecfc3834fd..a867d5943f 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -66,6 +74,10 @@ 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 { @@ -92,6 +104,10 @@ 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 { @@ -118,6 +134,10 @@ 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 { @@ -142,6 +162,10 @@ 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 { @@ -168,6 +192,10 @@ 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 { @@ -194,6 +222,10 @@ 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 { @@ -220,6 +252,10 @@ 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 { @@ -246,6 +282,10 @@ 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 { @@ -272,6 +312,10 @@ 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 { @@ -298,6 +342,10 @@ 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 { @@ -324,6 +372,10 @@ 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 { @@ -350,6 +402,10 @@ 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 { @@ -376,6 +432,10 @@ 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 { @@ -400,6 +460,10 @@ 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 { @@ -424,6 +488,10 @@ 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 { @@ -450,6 +518,10 @@ 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 { @@ -476,6 +548,10 @@ 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 { @@ -502,6 +578,10 @@ 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 { @@ -528,6 +608,10 @@ 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 { @@ -554,6 +638,10 @@ 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) @@ -568,6 +656,10 @@ 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 { @@ -594,6 +686,10 @@ 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) @@ -608,6 +704,10 @@ 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) @@ -622,6 +722,10 @@ 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 { @@ -642,13 +746,12 @@ func (_m *SharedChannelStore) UpsertAttachment(remote *model.SharedChannelAttach return r0, r1 } -type mockConstructorTestingTNewSharedChannelStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 d584221261..9c9dcfe663 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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 { @@ -94,6 +106,10 @@ 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() @@ -108,6 +124,10 @@ 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) @@ -122,6 +142,10 @@ 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 { @@ -148,6 +172,10 @@ 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) @@ -158,13 +186,12 @@ func (_m *StatusStore) UpdateLastActivityAt(userID string, lastActivityAt int64) return r0 } -type mockConstructorTestingTNewStatusStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 e45356ae71..cbf8a6ba4f 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -28,6 +28,10 @@ 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() @@ -44,6 +48,10 @@ 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() @@ -60,6 +68,10 @@ 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() @@ -76,6 +88,10 @@ 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() @@ -92,6 +108,10 @@ 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() @@ -108,6 +128,10 @@ 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() @@ -129,6 +153,10 @@ 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() @@ -145,6 +173,10 @@ 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() @@ -161,6 +193,10 @@ 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() @@ -177,6 +213,10 @@ 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() @@ -193,6 +233,10 @@ 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() @@ -209,6 +253,10 @@ 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() @@ -225,6 +273,10 @@ 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() @@ -246,6 +298,10 @@ 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() @@ -262,6 +318,10 @@ 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() @@ -278,6 +338,10 @@ 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 { @@ -304,6 +368,10 @@ 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 { @@ -328,6 +396,10 @@ 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 { @@ -352,6 +424,10 @@ 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() @@ -368,6 +444,10 @@ 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() @@ -384,6 +464,10 @@ 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 { @@ -408,6 +492,10 @@ 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() @@ -424,6 +512,10 @@ 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() @@ -440,6 +532,10 @@ 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() @@ -456,6 +552,10 @@ 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() @@ -477,6 +577,10 @@ 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() @@ -498,6 +602,10 @@ 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() @@ -514,6 +622,10 @@ 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() @@ -530,6 +642,10 @@ 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() @@ -546,6 +662,10 @@ 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() @@ -562,6 +682,10 @@ 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() @@ -578,6 +702,10 @@ 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() @@ -594,6 +722,10 @@ 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() @@ -610,6 +742,10 @@ 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() @@ -626,6 +762,10 @@ 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() @@ -642,6 +782,10 @@ 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() @@ -658,6 +802,10 @@ 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() @@ -679,6 +827,10 @@ 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() @@ -695,6 +847,10 @@ 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() @@ -709,6 +865,10 @@ 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() @@ -723,6 +883,10 @@ 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() @@ -739,6 +903,10 @@ 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() @@ -755,6 +923,10 @@ 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() @@ -771,6 +943,10 @@ 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() @@ -792,6 +968,10 @@ 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() @@ -808,6 +988,10 @@ 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() @@ -824,6 +1008,10 @@ 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() @@ -840,6 +1028,10 @@ 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() @@ -856,6 +1048,10 @@ 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() @@ -872,6 +1068,10 @@ 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() @@ -888,6 +1088,10 @@ 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() @@ -904,6 +1108,10 @@ 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() @@ -918,6 +1126,10 @@ 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() @@ -932,6 +1144,10 @@ 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() @@ -946,6 +1162,10 @@ 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() @@ -967,6 +1187,10 @@ 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() @@ -983,6 +1207,10 @@ 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() @@ -999,6 +1227,10 @@ 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() @@ -1015,6 +1247,10 @@ 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() @@ -1031,6 +1267,10 @@ 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() @@ -1043,13 +1283,12 @@ func (_m *Store) Webhook() store.WebhookStore { return r0 } -type mockConstructorTestingTNewStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 38dd182e82..0ce7874c2b 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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 { @@ -96,6 +108,10 @@ 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 { @@ -122,6 +138,10 @@ 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) @@ -136,6 +156,10 @@ 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) @@ -150,6 +174,10 @@ 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) @@ -160,13 +188,12 @@ func (_m *SystemStore) Update(system *model.System) error { return r0 } -type mockConstructorTestingTNewSystemStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 1fd55f01ab..2c23ba3077 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -43,6 +47,10 @@ 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 { @@ -67,6 +75,10 @@ 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() @@ -86,6 +98,10 @@ 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 { @@ -112,6 +128,10 @@ 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 { @@ -136,6 +156,10 @@ 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 { @@ -162,6 +186,10 @@ 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 { @@ -188,6 +216,10 @@ 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 { @@ -214,6 +246,10 @@ 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 { @@ -240,6 +276,10 @@ 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 { @@ -266,6 +306,10 @@ 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 { @@ -292,6 +336,10 @@ 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 { @@ -318,6 +366,10 @@ 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 { @@ -344,6 +396,10 @@ 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 { @@ -370,6 +426,10 @@ 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 { @@ -396,6 +456,10 @@ 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 { @@ -422,6 +486,10 @@ 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 { @@ -448,6 +516,10 @@ 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 { @@ -474,6 +546,10 @@ 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 { @@ -500,6 +576,10 @@ 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 { @@ -526,6 +606,10 @@ 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 { @@ -552,6 +636,10 @@ 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 { @@ -578,6 +666,10 @@ 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 { @@ -604,6 +696,10 @@ 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 { @@ -630,6 +726,10 @@ 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 { @@ -656,6 +756,10 @@ 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 { @@ -682,6 +786,10 @@ 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 { @@ -708,6 +816,10 @@ 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 { @@ -732,6 +844,10 @@ 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 { @@ -758,6 +874,10 @@ 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 { @@ -787,6 +907,10 @@ 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 { @@ -813,6 +937,10 @@ 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) @@ -827,6 +955,10 @@ 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) @@ -841,6 +973,10 @@ 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) @@ -855,6 +991,10 @@ 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) @@ -869,6 +1009,10 @@ 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) @@ -883,6 +1027,10 @@ 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() @@ -897,6 +1045,10 @@ 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 { @@ -923,6 +1075,10 @@ 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 { @@ -949,6 +1105,10 @@ 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 { @@ -975,6 +1135,10 @@ 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 { @@ -1001,6 +1165,10 @@ 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 @@ -1034,6 +1202,10 @@ 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 { @@ -1060,6 +1232,10 @@ 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 { @@ -1086,6 +1262,10 @@ 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 { @@ -1112,6 +1292,10 @@ 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) @@ -1126,6 +1310,10 @@ 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 { @@ -1152,6 +1340,10 @@ 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) @@ -1166,6 +1358,10 @@ 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 { @@ -1192,6 +1388,10 @@ 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 { @@ -1212,13 +1412,12 @@ func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool, return r0, r1 } -type mockConstructorTestingTNewTeamStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 ce810e2efd..5e66c9e607 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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 { @@ -92,13 +104,12 @@ func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*mode return r0, r1 } -type mockConstructorTestingTNewTermsOfServiceStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 54b0d092e3..b8fbd477ac 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -33,6 +37,10 @@ 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) @@ -47,6 +55,10 @@ 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 { @@ -71,6 +83,10 @@ 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 { @@ -97,6 +113,10 @@ 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 { @@ -123,6 +143,10 @@ 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 { @@ -149,6 +173,10 @@ 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 { @@ -175,6 +203,10 @@ 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 { @@ -201,6 +233,10 @@ 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 { @@ -227,6 +263,10 @@ 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 { @@ -251,6 +291,10 @@ 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 { @@ -277,6 +321,10 @@ 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 { @@ -301,6 +349,10 @@ 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 { @@ -325,6 +377,10 @@ 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 { @@ -349,6 +405,10 @@ 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 { @@ -373,6 +433,10 @@ 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 { @@ -399,6 +463,10 @@ 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) @@ -413,6 +481,10 @@ 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) @@ -427,6 +499,10 @@ 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) @@ -441,6 +517,10 @@ 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) @@ -455,6 +535,10 @@ 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 @@ -486,6 +570,10 @@ 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 @@ -517,6 +605,10 @@ 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 { @@ -539,13 +631,12 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo return r0, r1 } -type mockConstructorTestingTNewThreadStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 54e3e78894..3b0c98c1e7 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -23,6 +23,10 @@ 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) @@ -37,6 +41,10 @@ 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 { @@ -63,6 +71,10 @@ 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 { @@ -89,6 +101,10 @@ 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) @@ -103,6 +119,10 @@ 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) @@ -113,13 +133,12 @@ func (_m *TokenStore) Save(recovery *model.Token) error { return r0 } -type mockConstructorTestingTNewTokenStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 38e419341f..4fe8d16cd9 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -70,6 +78,10 @@ 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 { @@ -92,13 +104,12 @@ func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*mo return r0, r1 } -type mockConstructorTestingTNewTrueUpReviewStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 05fcef13e9..4b22f2117e 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -19,6 +19,10 @@ 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) @@ -33,6 +37,10 @@ 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 { @@ -59,6 +67,10 @@ 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 { @@ -85,6 +97,10 @@ 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 { @@ -111,6 +127,10 @@ 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) @@ -121,13 +141,12 @@ func (_m *UploadSessionStore) Update(session *model.UploadSession) error { return r0 } -type mockConstructorTestingTNewUploadSessionStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 2d86b14219..1536bc5b66 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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) @@ -46,6 +54,10 @@ 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 { @@ -72,6 +84,10 @@ 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 { @@ -98,6 +114,10 @@ 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 { @@ -124,6 +144,10 @@ 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 { @@ -150,6 +174,10 @@ 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 { @@ -176,6 +204,10 @@ 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 { @@ -202,6 +234,10 @@ 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) @@ -216,6 +252,10 @@ 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) @@ -226,13 +266,12 @@ func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error { return r0 } -type mockConstructorTestingTNewUserAccessTokenStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 2b4244708a..9dafcb1f58 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -24,6 +24,10 @@ 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 { @@ -48,6 +52,10 @@ 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 { @@ -72,6 +80,10 @@ 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 { @@ -96,6 +108,10 @@ 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 { @@ -120,6 +136,10 @@ 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 { @@ -144,6 +164,10 @@ 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 { @@ -168,6 +192,10 @@ 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 { @@ -194,6 +222,10 @@ 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() @@ -213,6 +245,10 @@ 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 { @@ -237,6 +273,10 @@ 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 { @@ -263,6 +303,10 @@ 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 { @@ -289,6 +333,10 @@ 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 { @@ -315,6 +363,10 @@ 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 { @@ -341,6 +393,10 @@ 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 { @@ -367,6 +423,10 @@ 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 { @@ -393,6 +453,10 @@ 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 { @@ -419,6 +483,10 @@ 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 { @@ -445,6 +513,10 @@ 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 { @@ -471,6 +543,10 @@ 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 { @@ -495,6 +571,10 @@ 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 { @@ -521,6 +601,10 @@ 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 { @@ -547,6 +631,10 @@ 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 { @@ -573,6 +661,10 @@ 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 { @@ -599,6 +691,10 @@ 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 { @@ -625,6 +721,10 @@ 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() @@ -639,6 +739,10 @@ 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) @@ -653,6 +757,10 @@ 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) @@ -667,6 +775,10 @@ 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 { @@ -693,6 +805,10 @@ 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 { @@ -719,6 +835,10 @@ 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 { @@ -745,6 +865,10 @@ 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 { @@ -771,6 +895,10 @@ 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 { @@ -797,6 +925,10 @@ 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 { @@ -823,6 +955,10 @@ 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 { @@ -849,6 +985,10 @@ 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 { @@ -875,6 +1015,10 @@ 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 { @@ -901,6 +1045,10 @@ 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 { @@ -927,6 +1075,10 @@ 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 { @@ -953,6 +1105,10 @@ 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 { @@ -979,6 +1135,10 @@ 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 { @@ -1005,6 +1165,10 @@ 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 { @@ -1031,6 +1195,10 @@ 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 { @@ -1057,6 +1225,10 @@ 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 { @@ -1083,6 +1255,10 @@ 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 { @@ -1109,6 +1285,10 @@ 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 { @@ -1133,6 +1313,10 @@ 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 { @@ -1157,6 +1341,10 @@ 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 { @@ -1181,6 +1369,10 @@ 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 { @@ -1207,6 +1399,10 @@ 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 { @@ -1233,6 +1429,10 @@ 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 { @@ -1259,6 +1459,10 @@ 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 { @@ -1283,6 +1487,10 @@ 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) @@ -1312,6 +1520,10 @@ 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 { @@ -1336,6 +1548,10 @@ 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) @@ -1350,6 +1566,10 @@ 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) @@ -1364,6 +1584,10 @@ 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() @@ -1378,6 +1602,10 @@ 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 { @@ -1402,6 +1630,10 @@ 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) @@ -1416,6 +1648,10 @@ 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 { @@ -1442,6 +1678,10 @@ 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 { @@ -1468,6 +1708,10 @@ 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 { @@ -1494,6 +1738,10 @@ 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 { @@ -1520,6 +1768,10 @@ 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 { @@ -1546,6 +1798,10 @@ 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 { @@ -1572,6 +1828,10 @@ 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 { @@ -1598,6 +1858,10 @@ 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 { @@ -1624,6 +1888,10 @@ 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 { @@ -1650,6 +1918,10 @@ 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 { @@ -1674,6 +1946,10 @@ 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) @@ -1688,6 +1964,10 @@ 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) @@ -1702,6 +1982,10 @@ 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) @@ -1716,6 +2000,10 @@ 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) @@ -1730,6 +2018,10 @@ 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) @@ -1744,6 +2036,10 @@ 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) @@ -1758,6 +2054,10 @@ 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) @@ -1772,6 +2072,10 @@ 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 { @@ -1796,6 +2100,10 @@ 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 { @@ -1816,13 +2124,12 @@ func (_m *UserStore) VerifyEmail(userID string, email string) (string, error) { return r0, r1 } -type mockConstructorTestingTNewUserStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 bf3eebd906..06ae3c10a3 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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) @@ -32,6 +36,10 @@ 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 { @@ -58,6 +66,10 @@ 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 { @@ -80,13 +92,12 @@ func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfSer return r0, r1 } -type mockConstructorTestingTNewUserTermsOfServiceStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 28c31103b1..9831e88ead 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make store-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -71,6 +79,10 @@ 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) @@ -85,6 +97,10 @@ 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) @@ -99,6 +115,10 @@ 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 { @@ -125,6 +145,10 @@ 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 { @@ -151,6 +175,10 @@ 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 { @@ -177,6 +205,10 @@ 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 { @@ -203,6 +235,10 @@ 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 { @@ -229,6 +265,10 @@ 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 { @@ -255,6 +295,10 @@ 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 { @@ -281,6 +325,10 @@ 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 { @@ -307,6 +355,10 @@ 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 { @@ -333,6 +385,10 @@ 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 { @@ -359,6 +415,10 @@ 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 { @@ -385,6 +445,10 @@ 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 { @@ -411,6 +475,10 @@ 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 { @@ -442,6 +510,10 @@ 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) @@ -456,6 +528,10 @@ 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) @@ -470,6 +546,10 @@ 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) @@ -484,6 +564,10 @@ 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) @@ -498,6 +582,10 @@ 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 { @@ -524,6 +612,10 @@ 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 { @@ -550,6 +642,10 @@ 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 { @@ -576,6 +672,10 @@ 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 { @@ -598,13 +698,12 @@ func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.Outg return r0, r1 } -type mockConstructorTestingTNewWebhookStore interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *WebhookStore { mock := &WebhookStore{} mock.Mock.Test(t) diff --git a/server/channels/utils/mocks/LicenseValidatorIface.go b/server/channels/utils/mocks/LicenseValidatorIface.go index fe77edecba..4c38386f1f 100644 --- a/server/channels/utils/mocks/LicenseValidatorIface.go +++ b/server/channels/utils/mocks/LicenseValidatorIface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make misc-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -46,6 +50,10 @@ 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 { @@ -66,13 +74,12 @@ func (_m *LicenseValidatorIface) ValidateLicense(signed []byte) (string, error) return r0, r1 } -type mockConstructorTestingTNewLicenseValidatorIface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *LicenseValidatorIface { mock := &LicenseValidatorIface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/AccountMigrationInterface.go b/server/einterfaces/mocks/AccountMigrationInterface.go index 4c30dba709..e269bf4520 100644 --- a/server/einterfaces/mocks/AccountMigrationInterface.go +++ b/server/einterfaces/mocks/AccountMigrationInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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) @@ -35,6 +39,10 @@ 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) @@ -47,13 +55,12 @@ func (_m *AccountMigrationInterface) MigrateToSaml(c request.CTX, fromAuthServic return r0 } -type mockConstructorTestingTNewAccountMigrationInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *AccountMigrationInterface { mock := &AccountMigrationInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/CloudInterface.go b/server/einterfaces/mocks/CloudInterface.go index 96bced70e3..adafc72dd3 100644 --- a/server/einterfaces/mocks/CloudInterface.go +++ b/server/einterfaces/mocks/CloudInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -45,6 +49,10 @@ 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 { @@ -71,6 +79,10 @@ 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 { @@ -97,6 +109,10 @@ 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) @@ -111,6 +127,10 @@ 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) @@ -125,6 +145,10 @@ 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 { @@ -151,6 +175,10 @@ 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 { @@ -177,6 +205,10 @@ 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() @@ -191,6 +223,10 @@ 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 { @@ -217,6 +253,10 @@ 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 { @@ -243,6 +283,10 @@ 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 { @@ -269,6 +313,10 @@ 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 { @@ -295,6 +343,10 @@ 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 { @@ -321,6 +373,10 @@ 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 { @@ -347,6 +403,10 @@ 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 { @@ -373,6 +433,10 @@ 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 { @@ -399,6 +463,10 @@ 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 { @@ -425,6 +493,10 @@ 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 @@ -458,6 +530,10 @@ 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 { @@ -484,6 +560,10 @@ 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 { @@ -510,6 +590,10 @@ 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 @@ -543,6 +627,10 @@ 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 { @@ -569,6 +657,10 @@ 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 { @@ -595,6 +687,10 @@ 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 { @@ -621,6 +717,10 @@ 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() @@ -635,6 +735,10 @@ 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() @@ -649,6 +753,10 @@ 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 { @@ -675,6 +783,10 @@ 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() @@ -689,6 +801,10 @@ 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) @@ -703,6 +819,10 @@ 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) @@ -717,6 +837,10 @@ 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) @@ -731,6 +855,10 @@ 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 { @@ -757,6 +885,10 @@ 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 { @@ -783,6 +915,10 @@ 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) @@ -793,13 +929,12 @@ func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) err return r0 } -type mockConstructorTestingTNewCloudInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *CloudInterface { mock := &CloudInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/CloudJobInterface.go b/server/einterfaces/mocks/CloudJobInterface.go index 9365c9095c..ddd62237d2 100644 --- a/server/einterfaces/mocks/CloudJobInterface.go +++ b/server/einterfaces/mocks/CloudJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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() @@ -36,6 +40,10 @@ 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() @@ -48,13 +56,12 @@ func (_m *CloudJobInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewCloudJobInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *CloudJobInterface { mock := &CloudJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ClusterInterface.go b/server/einterfaces/mocks/ClusterInterface.go index 9530431f58..911edaa395 100644 --- a/server/einterfaces/mocks/ClusterInterface.go +++ b/server/einterfaces/mocks/ClusterInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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) @@ -36,6 +40,10 @@ 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() @@ -50,6 +58,10 @@ 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() @@ -66,6 +78,10 @@ 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 { @@ -94,6 +110,10 @@ 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 { @@ -122,6 +142,10 @@ 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() @@ -138,6 +162,10 @@ 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 { @@ -166,6 +194,10 @@ 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() @@ -180,6 +212,10 @@ 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() @@ -199,6 +235,10 @@ 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 { @@ -237,6 +277,10 @@ 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) @@ -257,13 +301,12 @@ func (_m *ClusterInterface) StopInterNodeCommunication() { _m.Called() } -type mockConstructorTestingTNewClusterInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ClusterInterface { mock := &ClusterInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ClusterMessageHandler.go b/server/einterfaces/mocks/ClusterMessageHandler.go index 6eeab343bb..d969ec3e4c 100644 --- a/server/einterfaces/mocks/ClusterMessageHandler.go +++ b/server/einterfaces/mocks/ClusterMessageHandler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,13 +19,12 @@ func (_m *ClusterMessageHandler) Execute(msg *model.ClusterMessage) { _m.Called(msg) } -type mockConstructorTestingTNewClusterMessageHandler interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ClusterMessageHandler { mock := &ClusterMessageHandler{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ComplianceInterface.go b/server/einterfaces/mocks/ComplianceInterface.go index ea5d98b258..0eb3b53952 100644 --- a/server/einterfaces/mocks/ComplianceInterface.go +++ b/server/einterfaces/mocks/ComplianceInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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) @@ -36,13 +40,12 @@ func (_m *ComplianceInterface) StartComplianceDailyJob() { _m.Called() } -type mockConstructorTestingTNewComplianceInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ComplianceInterface { mock := &ComplianceInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/DataRetentionInterface.go b/server/einterfaces/mocks/DataRetentionInterface.go index ea03a72b20..cce90c35a3 100644 --- a/server/einterfaces/mocks/DataRetentionInterface.go +++ b/server/einterfaces/mocks/DataRetentionInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,6 +18,10 @@ 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) @@ -34,6 +38,10 @@ 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) @@ -50,6 +58,10 @@ 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 { @@ -78,6 +90,10 @@ 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) @@ -94,6 +110,10 @@ 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 { @@ -122,6 +142,10 @@ 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 { @@ -150,6 +174,10 @@ 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 { @@ -178,6 +206,10 @@ 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 { @@ -206,6 +238,10 @@ 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 { @@ -232,6 +268,10 @@ 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 { @@ -260,6 +300,10 @@ 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 { @@ -288,6 +332,10 @@ 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 { @@ -316,6 +364,10 @@ 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 { @@ -344,6 +396,10 @@ 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) @@ -360,6 +416,10 @@ 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) @@ -372,13 +432,12 @@ func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs return r0 } -type mockConstructorTestingTNewDataRetentionInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *DataRetentionInterface { mock := &DataRetentionInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/DataRetentionJobInterface.go b/server/einterfaces/mocks/DataRetentionJobInterface.go index 8b6d90107f..d1390ed65e 100644 --- a/server/einterfaces/mocks/DataRetentionJobInterface.go +++ b/server/einterfaces/mocks/DataRetentionJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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() @@ -36,6 +40,10 @@ 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() @@ -48,13 +56,12 @@ func (_m *DataRetentionJobInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewDataRetentionJobInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *DataRetentionJobInterface { mock := &DataRetentionJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go b/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go index 0f155f391b..9580ae23ce 100644 --- a/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go +++ b/server/einterfaces/mocks/ElasticsearchAggregatorInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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() @@ -36,6 +40,10 @@ 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() @@ -48,13 +56,12 @@ func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewElasticsearchAggregatorInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ElasticsearchAggregatorInterface { mock := &ElasticsearchAggregatorInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/ElasticsearchIndexerInterface.go b/server/einterfaces/mocks/ElasticsearchIndexerInterface.go index 7b6a0dd66b..3e350af75a 100644 --- a/server/einterfaces/mocks/ElasticsearchIndexerInterface.go +++ b/server/einterfaces/mocks/ElasticsearchIndexerInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,6 +18,10 @@ 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() @@ -30,13 +34,12 @@ func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewElasticsearchIndexerInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ElasticsearchIndexerInterface { mock := &ElasticsearchIndexerInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/IPFilteringInterface.go b/server/einterfaces/mocks/IPFilteringInterface.go index 196fe49406..7ecb30d9a6 100644 --- a/server/einterfaces/mocks/IPFilteringInterface.go +++ b/server/einterfaces/mocks/IPFilteringInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -44,6 +48,10 @@ 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 { @@ -66,13 +74,12 @@ func (_m *IPFilteringInterface) GetIPFilters() (*model.AllowedIPRanges, error) { return r0, r1 } -type mockConstructorTestingTNewIPFilteringInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *IPFilteringInterface { mock := &IPFilteringInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/IndexerJobInterface.go b/server/einterfaces/mocks/IndexerJobInterface.go index 1c0a6c4cbc..671fcc60d6 100644 --- a/server/einterfaces/mocks/IndexerJobInterface.go +++ b/server/einterfaces/mocks/IndexerJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,6 +18,10 @@ 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() @@ -30,13 +34,12 @@ func (_m *IndexerJobInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewIndexerJobInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *IndexerJobInterface { mock := &IndexerJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LdapInterface.go b/server/einterfaces/mocks/LdapInterface.go index 665f65451a..cabdf55035 100644 --- a/server/einterfaces/mocks/LdapInterface.go +++ b/server/einterfaces/mocks/LdapInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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) @@ -35,6 +39,10 @@ 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) @@ -51,6 +59,10 @@ 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) @@ -65,6 +77,10 @@ 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 { @@ -93,6 +109,10 @@ 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) @@ -109,6 +129,10 @@ 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) @@ -123,6 +147,10 @@ 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 @@ -158,6 +186,10 @@ 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 { @@ -186,6 +218,10 @@ 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 { @@ -214,6 +250,10 @@ 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) @@ -228,6 +268,10 @@ 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 { @@ -256,6 +300,10 @@ 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 { @@ -284,6 +332,10 @@ 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 { @@ -308,6 +360,10 @@ 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) @@ -322,6 +378,10 @@ 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) @@ -338,6 +398,10 @@ 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 { @@ -366,6 +430,10 @@ 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) @@ -383,13 +451,12 @@ func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 mo _m.Called(_a0, _a1, _a2) } -type mockConstructorTestingTNewLdapInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *LdapInterface { mock := &LdapInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LdapSyncInterface.go b/server/einterfaces/mocks/LdapSyncInterface.go index e5f4ae9ada..690e460e5d 100644 --- a/server/einterfaces/mocks/LdapSyncInterface.go +++ b/server/einterfaces/mocks/LdapSyncInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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() @@ -36,6 +40,10 @@ 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() @@ -48,13 +56,12 @@ func (_m *LdapSyncInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewLdapSyncInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *LdapSyncInterface { mock := &LdapSyncInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/LicenseInterface.go b/server/einterfaces/mocks/LicenseInterface.go index 44606c5906..8e5634ebfe 100644 --- a/server/einterfaces/mocks/LicenseInterface.go +++ b/server/einterfaces/mocks/LicenseInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -18,6 +18,10 @@ 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 { @@ -42,6 +46,10 @@ 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 { @@ -64,13 +72,12 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) { return r0, r1 } -type mockConstructorTestingTNewLicenseInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *LicenseInterface { mock := &LicenseInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MessageExportInterface.go b/server/einterfaces/mocks/MessageExportInterface.go index 42bf0a3d63..c5c09c2ba0 100644 --- a/server/einterfaces/mocks/MessageExportInterface.go +++ b/server/einterfaces/mocks/MessageExportInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -45,6 +49,10 @@ 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 { @@ -69,13 +77,12 @@ func (_m *MessageExportInterface) StartSynchronizeJob(c request.CTX, exportFromT return r0, r1 } -type mockConstructorTestingTNewMessageExportInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *MessageExportInterface { mock := &MessageExportInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MessageExportJobInterface.go b/server/einterfaces/mocks/MessageExportJobInterface.go index e33dd12d48..0159f2adf0 100644 --- a/server/einterfaces/mocks/MessageExportJobInterface.go +++ b/server/einterfaces/mocks/MessageExportJobInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -20,6 +20,10 @@ 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() @@ -36,6 +40,10 @@ 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() @@ -48,13 +56,12 @@ func (_m *MessageExportJobInterface) MakeWorker() model.Worker { return r0 } -type mockConstructorTestingTNewMessageExportJobInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *MessageExportJobInterface { mock := &MessageExportJobInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/MetricsInterface.go b/server/einterfaces/mocks/MetricsInterface.go index 7c50f2f03e..20120c7cb9 100644 --- a/server/einterfaces/mocks/MetricsInterface.go +++ b/server/einterfaces/mocks/MetricsInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -47,6 +47,10 @@ 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() @@ -359,13 +363,12 @@ func (_m *MetricsInterface) UnregisterDBCollector(db *sql.DB, name string) { _m.Called(db, name) } -type mockConstructorTestingTNewMetricsInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *MetricsInterface { mock := &MetricsInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/NotificationInterface.go b/server/einterfaces/mocks/NotificationInterface.go index 71498ec0d5..eabc8ec4eb 100644 --- a/server/einterfaces/mocks/NotificationInterface.go +++ b/server/einterfaces/mocks/NotificationInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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() @@ -35,6 +39,10 @@ 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 { @@ -59,13 +67,12 @@ func (_m *NotificationInterface) GetNotificationMessage(c request.CTX, ack *mode return r0, r1 } -type mockConstructorTestingTNewNotificationInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *NotificationInterface { mock := &NotificationInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/OAuthProvider.go b/server/einterfaces/mocks/OAuthProvider.go index aa5a2db38d..34fd90bd93 100644 --- a/server/einterfaces/mocks/OAuthProvider.go +++ b/server/einterfaces/mocks/OAuthProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -22,6 +22,10 @@ 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 { @@ -48,6 +52,10 @@ 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 { @@ -74,6 +82,10 @@ 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 { @@ -100,6 +112,10 @@ 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) @@ -110,13 +126,12 @@ func (_m *OAuthProvider) IsSameUser(c request.CTX, dbUser *model.User, oAuthUser return r0 } -type mockConstructorTestingTNewOAuthProvider interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *OAuthProvider { mock := &OAuthProvider{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go b/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go index 695725593d..8989b89381 100644 --- a/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go +++ b/server/einterfaces/mocks/OutgoingOAuthConnectionInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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) @@ -35,6 +39,10 @@ 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 { @@ -63,6 +71,10 @@ 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 { @@ -91,6 +103,10 @@ 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 { @@ -119,6 +135,10 @@ 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 { @@ -157,6 +177,10 @@ 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 { @@ -185,6 +209,10 @@ 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 { @@ -209,13 +237,12 @@ func (_m *OutgoingOAuthConnectionInterface) UpdateConnection(rctx request.CTX, c return r0, r1 } -type mockConstructorTestingTNewOutgoingOAuthConnectionInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *OutgoingOAuthConnectionInterface { mock := &OutgoingOAuthConnectionInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/SamlInterface.go b/server/einterfaces/mocks/SamlInterface.go index 10e8130cd0..7fee33a61d 100644 --- a/server/einterfaces/mocks/SamlInterface.go +++ b/server/einterfaces/mocks/SamlInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -19,6 +19,10 @@ 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 { @@ -47,6 +51,10 @@ 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) @@ -61,6 +69,10 @@ 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) @@ -75,6 +87,10 @@ 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 { @@ -103,6 +119,10 @@ 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 { @@ -125,13 +145,12 @@ func (_m *SamlInterface) GetMetadata(c request.CTX) (string, *model.AppError) { return r0, r1 } -type mockConstructorTestingTNewSamlInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *SamlInterface { mock := &SamlInterface{} mock.Mock.Test(t) diff --git a/server/einterfaces/mocks/Scheduler.go b/server/einterfaces/mocks/Scheduler.go index ad67a09162..7e452769e4 100644 --- a/server/einterfaces/mocks/Scheduler.go +++ b/server/einterfaces/mocks/Scheduler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. @@ -21,6 +21,10 @@ 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) @@ -35,6 +39,10 @@ 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) @@ -51,6 +59,10 @@ 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 { @@ -75,13 +87,12 @@ func (_m *Scheduler) ScheduleJob(c request.CTX, cfg *model.Config, pendingJobs b return r0, r1 } -type mockConstructorTestingTNewScheduler interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 a10d933f11..14f0afa539 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make searchengine-mocks`. @@ -21,6 +21,10 @@ 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) @@ -37,6 +41,10 @@ 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) @@ -53,6 +61,10 @@ 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) @@ -69,6 +81,10 @@ 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) @@ -85,6 +101,10 @@ 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) @@ -101,6 +121,10 @@ 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) @@ -117,6 +141,10 @@ 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) @@ -133,6 +161,10 @@ 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) @@ -149,6 +181,10 @@ 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) @@ -165,6 +201,10 @@ 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) @@ -181,6 +221,10 @@ 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() @@ -195,6 +239,10 @@ 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() @@ -209,6 +257,10 @@ 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() @@ -225,6 +277,10 @@ 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() @@ -239,6 +295,10 @@ 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) @@ -255,6 +315,10 @@ 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) @@ -271,6 +335,10 @@ 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) @@ -287,6 +355,10 @@ 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) @@ -303,6 +375,10 @@ 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() @@ -317,6 +393,10 @@ 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() @@ -331,6 +411,10 @@ 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() @@ -345,6 +429,10 @@ 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() @@ -359,6 +447,10 @@ 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() @@ -373,6 +465,10 @@ 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() @@ -387,6 +483,10 @@ 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() @@ -401,6 +501,10 @@ 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) @@ -417,6 +521,10 @@ 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) @@ -433,6 +541,10 @@ 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) @@ -449,6 +561,10 @@ 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 { @@ -477,6 +593,10 @@ 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 { @@ -505,6 +625,10 @@ 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 @@ -542,6 +666,10 @@ 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 @@ -579,6 +707,10 @@ 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 { @@ -607,6 +739,10 @@ 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() @@ -623,6 +759,10 @@ 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() @@ -639,6 +779,10 @@ 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) @@ -656,13 +800,12 @@ func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) { _m.Called(cfg) } -type mockConstructorTestingTNewSearchEngineInterface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 0af65db307..8144909328 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make sharedchannel-mocks`. @@ -22,6 +22,10 @@ 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 { @@ -50,6 +54,10 @@ 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) @@ -66,6 +74,10 @@ 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 { @@ -94,6 +106,10 @@ 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 { @@ -122,6 +138,10 @@ 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 { @@ -150,6 +170,10 @@ 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 { @@ -178,6 +202,10 @@ 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) @@ -194,6 +222,10 @@ 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 { @@ -229,6 +261,10 @@ 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 { @@ -257,6 +293,10 @@ 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 @@ -292,6 +332,10 @@ 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) @@ -313,6 +357,10 @@ 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) @@ -327,6 +375,10 @@ 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) @@ -341,6 +393,10 @@ 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 { @@ -365,6 +421,10 @@ 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 { @@ -393,6 +453,10 @@ 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) @@ -414,6 +478,10 @@ 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 { @@ -442,6 +510,10 @@ 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) @@ -458,6 +530,10 @@ 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 { @@ -482,13 +558,12 @@ func (_m *MockAppIface) UpdatePost(c request.CTX, post *model.Post, safeUpdate b return r0, r1 } -type mockConstructorTestingTNewMockAppIface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 5de1ede5a9..a623d97cbc 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make sharedchannel-mocks`. @@ -26,6 +26,10 @@ 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) @@ -40,6 +44,10 @@ 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() @@ -56,6 +64,10 @@ 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() @@ -72,6 +84,10 @@ 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() @@ -88,6 +104,10 @@ 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() @@ -104,6 +124,10 @@ 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() @@ -118,6 +142,10 @@ 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() @@ -135,13 +163,12 @@ func (_m *MockServerIface) RemoveClusterLeaderChangedListener(id string) { _m.Called(id) } -type mockConstructorTestingTNewMockServerIface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 c2185f8fbd..569c01a7d2 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make telemetry-mocks`. @@ -24,6 +24,10 @@ 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() @@ -40,6 +44,10 @@ 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() @@ -56,6 +64,10 @@ 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 { @@ -84,6 +96,10 @@ 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 { @@ -112,6 +128,10 @@ 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() @@ -128,6 +148,10 @@ 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() @@ -142,6 +166,10 @@ 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() @@ -154,13 +182,12 @@ func (_m *ServerIface) License() *model.License { return r0 } -type mockConstructorTestingTNewServerIface interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 8d81a03d91..dd294916e7 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -23,6 +23,10 @@ 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 { @@ -47,6 +51,10 @@ 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) @@ -61,6 +69,10 @@ 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() @@ -75,6 +87,10 @@ 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 { @@ -99,6 +115,10 @@ 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 { @@ -123,6 +143,10 @@ 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 { @@ -147,6 +171,10 @@ 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 { @@ -173,6 +201,10 @@ 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 { @@ -199,6 +231,10 @@ 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) @@ -213,6 +249,10 @@ 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 { @@ -239,6 +279,10 @@ 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 { @@ -265,6 +309,10 @@ 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) @@ -279,6 +327,10 @@ 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) @@ -293,6 +345,10 @@ 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() @@ -307,6 +363,10 @@ 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 { @@ -327,13 +387,12 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) { return r0, r1 } -type mockConstructorTestingTNewFileBackend interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 c2e4bdce7c..68f19e96fe 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -19,6 +19,10 @@ 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 @@ -46,13 +50,12 @@ func (_m *FileBackendWithLinkGenerator) GeneratePublicLink(path string) (string, return r0, r1, r2 } -type mockConstructorTestingTNewFileBackendWithLinkGenerator interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *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 42ace6c2bf..1860204fdd 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.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make filestore-mocks`. @@ -15,6 +15,10 @@ 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() @@ -29,6 +33,10 @@ 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 { @@ -53,6 +61,10 @@ 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 { @@ -73,13 +85,12 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) { return r0, r1 } -type mockConstructorTestingTNewReadCloseSeeker interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *ReadCloseSeeker { mock := &ReadCloseSeeker{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/api.go b/server/public/plugin/plugintest/api.go index 805adefe8a..635aed9966 100644 --- a/server/public/plugin/plugintest/api.go +++ b/server/public/plugin/plugintest/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -22,6 +22,10 @@ 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 { @@ -50,6 +54,10 @@ 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 { @@ -78,6 +86,10 @@ 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 { @@ -106,6 +118,10 @@ 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 { @@ -134,6 +150,10 @@ 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 { @@ -162,6 +182,10 @@ 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 { @@ -190,6 +214,10 @@ 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 { @@ -218,6 +246,10 @@ 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 { @@ -244,6 +276,10 @@ 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 { @@ -272,6 +308,10 @@ 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 { @@ -300,6 +340,10 @@ 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 { @@ -328,6 +372,10 @@ 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 { @@ -356,6 +404,10 @@ 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 { @@ -384,6 +436,10 @@ 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 { @@ -412,6 +468,10 @@ 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 { @@ -440,6 +500,10 @@ 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 { @@ -466,6 +530,10 @@ 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 { @@ -494,6 +562,10 @@ 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 { @@ -522,6 +594,10 @@ 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) @@ -538,6 +614,10 @@ 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) @@ -554,6 +634,10 @@ 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) @@ -573,6 +657,10 @@ 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) @@ -589,6 +677,10 @@ 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) @@ -605,6 +697,10 @@ 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) @@ -621,6 +717,10 @@ 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) @@ -637,6 +737,10 @@ 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) @@ -653,6 +757,10 @@ 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) @@ -669,6 +777,10 @@ 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) @@ -685,6 +797,10 @@ 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) @@ -701,6 +817,10 @@ 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 { @@ -725,6 +845,10 @@ 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 { @@ -751,6 +875,10 @@ 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) @@ -767,6 +895,10 @@ 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 { @@ -795,6 +927,10 @@ 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 { @@ -823,6 +959,10 @@ 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 { @@ -847,6 +987,10 @@ 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 { @@ -875,6 +1019,10 @@ 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 { @@ -903,6 +1051,10 @@ 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 { @@ -931,6 +1083,10 @@ 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 { @@ -959,6 +1115,10 @@ 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 { @@ -987,6 +1147,10 @@ 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 { @@ -1015,6 +1179,10 @@ 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 { @@ -1043,6 +1211,10 @@ 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 { @@ -1071,6 +1243,10 @@ 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 { @@ -1099,6 +1275,10 @@ 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 { @@ -1127,6 +1307,10 @@ 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 { @@ -1153,6 +1337,10 @@ 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 { @@ -1179,6 +1367,10 @@ 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() @@ -1195,6 +1387,10 @@ 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() @@ -1209,6 +1405,10 @@ 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 { @@ -1237,6 +1437,10 @@ 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 { @@ -1265,6 +1469,10 @@ 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 { @@ -1293,6 +1501,10 @@ 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 @@ -1328,6 +1540,10 @@ 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 { @@ -1356,6 +1572,10 @@ 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 { @@ -1384,6 +1604,10 @@ 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 { @@ -1412,6 +1636,10 @@ 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 { @@ -1440,6 +1668,10 @@ 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 { @@ -1466,6 +1698,10 @@ 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 { @@ -1494,6 +1730,10 @@ 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 { @@ -1522,6 +1762,10 @@ 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 { @@ -1550,6 +1794,10 @@ 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 { @@ -1578,6 +1826,10 @@ 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 { @@ -1606,6 +1858,10 @@ 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 { @@ -1634,6 +1890,10 @@ 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 { @@ -1662,6 +1922,10 @@ 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() @@ -1678,6 +1942,10 @@ 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 { @@ -1706,6 +1974,10 @@ 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() @@ -1722,6 +1994,10 @@ 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 { @@ -1750,6 +2026,10 @@ 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 { @@ -1778,6 +2058,10 @@ 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 { @@ -1806,6 +2090,10 @@ 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 { @@ -1834,6 +2122,10 @@ 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 { @@ -1862,6 +2154,10 @@ 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 { @@ -1890,6 +2186,10 @@ 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 { @@ -1918,6 +2218,10 @@ 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 { @@ -1946,6 +2250,10 @@ 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 { @@ -1972,6 +2280,10 @@ 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 { @@ -2000,6 +2312,10 @@ 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 { @@ -2028,6 +2344,10 @@ 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 { @@ -2056,6 +2376,10 @@ 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 { @@ -2084,6 +2408,10 @@ 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() @@ -2098,6 +2426,10 @@ 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 { @@ -2126,6 +2458,10 @@ 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 { @@ -2152,6 +2488,10 @@ 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 { @@ -2180,6 +2520,10 @@ 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 { @@ -2208,6 +2552,10 @@ 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 { @@ -2236,6 +2584,10 @@ 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 { @@ -2264,6 +2616,10 @@ 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 { @@ -2292,6 +2648,10 @@ 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 { @@ -2320,6 +2680,10 @@ 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 { @@ -2348,6 +2712,10 @@ 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 { @@ -2376,6 +2744,10 @@ 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 { @@ -2404,6 +2776,10 @@ 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 { @@ -2432,6 +2808,10 @@ 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() @@ -2446,6 +2826,10 @@ 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() @@ -2462,6 +2846,10 @@ 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 { @@ -2488,6 +2876,10 @@ 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 { @@ -2516,6 +2908,10 @@ 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 { @@ -2544,6 +2940,10 @@ 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 { @@ -2572,6 +2972,10 @@ 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 { @@ -2600,6 +3004,10 @@ 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 { @@ -2628,6 +3036,10 @@ 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 { @@ -2656,6 +3068,10 @@ 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 { @@ -2684,6 +3100,10 @@ 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 { @@ -2712,6 +3132,10 @@ 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 { @@ -2740,6 +3164,10 @@ 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) @@ -2754,6 +3182,10 @@ 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) @@ -2768,6 +3200,10 @@ 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) @@ -2782,6 +3218,10 @@ 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 { @@ -2810,6 +3250,10 @@ 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) @@ -2824,6 +3268,10 @@ 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() @@ -2838,6 +3286,10 @@ 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 { @@ -2864,6 +3316,10 @@ 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 { @@ -2890,6 +3346,10 @@ 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) @@ -2906,6 +3366,10 @@ 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() @@ -2922,6 +3386,10 @@ 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 { @@ -2950,6 +3418,10 @@ 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 { @@ -2978,6 +3450,10 @@ 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) @@ -2994,6 +3470,10 @@ 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) @@ -3010,6 +3490,10 @@ 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 { @@ -3036,6 +3520,10 @@ 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 { @@ -3062,6 +3550,10 @@ 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 { @@ -3088,6 +3580,10 @@ 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 { @@ -3114,6 +3610,10 @@ 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 { @@ -3140,6 +3640,10 @@ 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) @@ -3186,6 +3690,10 @@ 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) @@ -3202,6 +3710,10 @@ 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 { @@ -3230,6 +3742,10 @@ 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) @@ -3246,6 +3762,10 @@ 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) @@ -3262,6 +3782,10 @@ 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) @@ -3278,6 +3802,10 @@ 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) @@ -3292,6 +3820,10 @@ 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) @@ -3313,6 +3845,10 @@ 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 { @@ -3341,6 +3877,10 @@ 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) @@ -3355,6 +3895,10 @@ 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) @@ -3369,6 +3913,10 @@ 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 { @@ -3393,6 +3941,10 @@ 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) @@ -3409,6 +3961,10 @@ 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) @@ -3425,6 +3981,10 @@ 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) @@ -3441,6 +4001,10 @@ 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) @@ -3457,6 +4021,10 @@ 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) @@ -3473,6 +4041,10 @@ 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) @@ -3489,6 +4061,10 @@ 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) @@ -3505,6 +4081,10 @@ 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) @@ -3519,6 +4099,10 @@ 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) @@ -3535,6 +4119,10 @@ 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) @@ -3551,6 +4139,10 @@ 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 { @@ -3579,6 +4171,10 @@ 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 { @@ -3607,6 +4203,10 @@ 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 { @@ -3635,6 +4235,10 @@ 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 { @@ -3663,6 +4267,10 @@ 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 { @@ -3691,6 +4299,10 @@ 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) @@ -3707,6 +4319,10 @@ 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) @@ -3723,6 +4339,10 @@ 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) @@ -3739,6 +4359,10 @@ 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) @@ -3755,6 +4379,10 @@ 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) @@ -3771,6 +4399,10 @@ 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) @@ -3787,6 +4419,10 @@ 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 { @@ -3815,6 +4451,10 @@ 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 { @@ -3841,6 +4481,10 @@ 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) @@ -3855,6 +4499,10 @@ 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) @@ -3869,6 +4517,10 @@ 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) @@ -3883,6 +4535,10 @@ 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) @@ -3897,6 +4553,10 @@ 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 { @@ -3921,6 +4581,10 @@ 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 { @@ -3949,6 +4613,10 @@ 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 { @@ -3977,6 +4645,10 @@ 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 { @@ -4005,6 +4677,10 @@ 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 { @@ -4033,6 +4709,10 @@ 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 { @@ -4061,6 +4741,10 @@ 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 { @@ -4087,6 +4771,10 @@ 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) @@ -4103,6 +4791,10 @@ 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 { @@ -4131,6 +4823,10 @@ 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 { @@ -4159,6 +4855,10 @@ 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) @@ -4175,6 +4875,10 @@ 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 { @@ -4201,6 +4905,10 @@ 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) @@ -4215,6 +4923,10 @@ 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 { @@ -4243,6 +4955,10 @@ 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 { @@ -4271,6 +4987,10 @@ 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 { @@ -4299,6 +5019,10 @@ 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) @@ -4315,6 +5039,10 @@ 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 { @@ -4343,6 +5071,10 @@ 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) @@ -4359,6 +5091,10 @@ 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 { @@ -4387,6 +5123,10 @@ 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 { @@ -4415,6 +5155,10 @@ 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 { @@ -4441,6 +5185,10 @@ 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 { @@ -4465,13 +5213,12 @@ func (_m *API) UploadFile(data []byte, channelId string, filename string) (*mode return r0, r1 } -type mockConstructorTestingTNewAPI interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *API { mock := &API{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/driver.go b/server/public/plugin/plugintest/driver.go index 25d02489e8..a60971e252 100644 --- a/server/public/plugin/plugintest/driver.go +++ b/server/public/plugin/plugintest/driver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -21,6 +21,10 @@ 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 { @@ -45,6 +49,10 @@ 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) @@ -59,6 +67,10 @@ 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 { @@ -83,6 +95,10 @@ 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) @@ -97,6 +113,10 @@ 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 { @@ -121,6 +141,10 @@ 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) @@ -135,6 +159,10 @@ 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) @@ -149,6 +177,10 @@ 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 @@ -180,6 +212,10 @@ 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) @@ -196,6 +232,10 @@ 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) @@ -210,6 +250,10 @@ 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) @@ -224,6 +268,10 @@ 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) @@ -238,6 +286,10 @@ 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 { @@ -262,6 +314,10 @@ 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) @@ -276,6 +332,10 @@ 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 { @@ -300,6 +360,10 @@ 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) @@ -314,6 +378,10 @@ 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 { @@ -338,6 +406,10 @@ 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 { @@ -362,6 +434,10 @@ 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) @@ -376,6 +452,10 @@ 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) @@ -386,13 +466,12 @@ func (_m *Driver) TxRollback(txID string) error { return r0 } -type mockConstructorTestingTNewDriver interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *Driver { mock := &Driver{} mock.Mock.Test(t) diff --git a/server/public/plugin/plugintest/hooks.go b/server/public/plugin/plugintest/hooks.go index 3846798913..2586588a6d 100644 --- a/server/public/plugin/plugintest/hooks.go +++ b/server/public/plugin/plugintest/hooks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -29,6 +29,10 @@ 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 { @@ -55,6 +59,10 @@ 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 { @@ -83,6 +91,10 @@ 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 { @@ -135,6 +147,10 @@ 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 { @@ -176,6 +192,10 @@ 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 { @@ -202,6 +222,10 @@ 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 { @@ -228,6 +252,10 @@ 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) @@ -244,6 +272,10 @@ 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 { @@ -270,6 +302,10 @@ 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() @@ -289,6 +325,10 @@ 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() @@ -303,6 +343,10 @@ 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() @@ -317,6 +361,10 @@ 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) @@ -341,6 +389,10 @@ 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) @@ -355,6 +407,10 @@ 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) @@ -369,6 +425,10 @@ 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) @@ -383,6 +443,10 @@ 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 { @@ -432,6 +496,10 @@ 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 { @@ -501,6 +569,10 @@ 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) @@ -516,13 +588,12 @@ func (_m *Hooks) WebSocketMessageHasBeenPosted(webConnID string, userID string, _m.Called(webConnID, userID, req) } -type mockConstructorTestingTNewHooks interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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 { +}) *Hooks { mock := &Hooks{} mock.Mock.Test(t)