Files
upstream-mattermost/server/channels/store/storetest/mocks/ReactionStore.go
upstream-mirror 240db4e2a7
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:29:55 +05:00

329 lines
8.3 KiB
Go

// Code generated by mockery v2.53.4. DO NOT EDIT.
// Regenerate this file using `make store-mocks`.
package mocks
import (
model "github.com/mattermost/mattermost/server/public/model"
request "github.com/mattermost/mattermost/server/public/shared/request"
mock "github.com/stretchr/testify/mock"
)
// ReactionStore is an autogenerated mock type for the ReactionStore type
type ReactionStore struct {
mock.Mock
}
// Delete provides a mock function with given fields: reaction
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 {
return rf(reaction)
}
if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok {
r0 = rf(reaction)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(*model.Reaction) error); ok {
r1 = rf(reaction)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeleteAllWithEmojiName provides a mock function with given fields: rctx, emojiName
func (_m *ReactionStore) DeleteAllWithEmojiName(rctx request.CTX, emojiName string) error {
ret := _m.Called(rctx, emojiName)
if len(ret) == 0 {
panic("no return value specified for DeleteAllWithEmojiName")
}
var r0 error
if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok {
r0 = rf(rctx, emojiName)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteOrphanedRowsByIds provides a mock function with given fields: r
func (_m *ReactionStore) DeleteOrphanedRowsByIds(r *model.RetentionIdsForDeletion) (int64, error) {
ret := _m.Called(r)
if len(ret) == 0 {
panic("no return value specified for DeleteOrphanedRowsByIds")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(*model.RetentionIdsForDeletion) (int64, error)); ok {
return rf(r)
}
if rf, ok := ret.Get(0).(func(*model.RetentionIdsForDeletion) int64); ok {
r0 = rf(r)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(*model.RetentionIdsForDeletion) error); ok {
r1 = rf(r)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExistsOnPost provides a mock function with given fields: postID, emojiName
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 {
return rf(postID, emojiName)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(postID, emojiName)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(postID, emojiName)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetForPost provides a mock function with given fields: postID, allowFromCache
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 {
return rf(postID, allowFromCache)
}
if rf, ok := ret.Get(0).(func(string, bool) []*model.Reaction); ok {
r0 = rf(postID, allowFromCache)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
r1 = rf(postID, allowFromCache)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetForPostSince provides a mock function with given fields: postID, since, excludeRemoteID, inclDeleted
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 {
return rf(postID, since, excludeRemoteID, inclDeleted)
}
if rf, ok := ret.Get(0).(func(string, int64, string, bool) []*model.Reaction); ok {
r0 = rf(postID, since, excludeRemoteID, inclDeleted)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(string, int64, string, bool) error); ok {
r1 = rf(postID, since, excludeRemoteID, inclDeleted)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetSingle provides a mock function with given fields: userID, postID, remoteID, emojiName
func (_m *ReactionStore) GetSingle(userID string, postID string, remoteID string, emojiName string) (*model.Reaction, error) {
ret := _m.Called(userID, postID, remoteID, emojiName)
if len(ret) == 0 {
panic("no return value specified for GetSingle")
}
var r0 *model.Reaction
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string, string) (*model.Reaction, error)); ok {
return rf(userID, postID, remoteID, emojiName)
}
if rf, ok := ret.Get(0).(func(string, string, string, string) *model.Reaction); ok {
r0 = rf(userID, postID, remoteID, emojiName)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(string, string, string, string) error); ok {
r1 = rf(userID, postID, remoteID, emojiName)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetUniqueCountForPost provides a mock function with given fields: postID
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 {
return rf(postID)
}
if rf, ok := ret.Get(0).(func(string) int); ok {
r0 = rf(postID)
} else {
r0 = ret.Get(0).(int)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(postID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PermanentDeleteBatch provides a mock function with given fields: endTime, limit
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 {
return rf(endTime, limit)
}
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
r0 = rf(endTime, limit)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
r1 = rf(endTime, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PermanentDeleteByUser provides a mock function with given fields: rctx, userID
func (_m *ReactionStore) 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)
} else {
r0 = ret.Error(0)
}
return r0
}
// Save provides a mock function with given fields: reaction
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 {
return rf(reaction)
}
if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok {
r0 = rf(reaction)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(*model.Reaction) error); ok {
r1 = rf(reaction)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewReactionStore creates a new instance of ReactionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewReactionStore(t interface {
mock.TestingT
Cleanup(func())
}) *ReactionStore {
mock := &ReactionStore{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}