snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
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

This commit is contained in:
upstream-mirror
2026-09-16 00:29:55 +05:00
commit 240db4e2a7
15309 changed files with 2173406 additions and 0 deletions

View File

@@ -0,0 +1,591 @@
// 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"
)
// JobStore is an autogenerated mock type for the JobStore type
type JobStore struct {
mock.Mock
}
// Cleanup provides a mock function with given fields: expiryTime, batchSize
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)
} else {
r0 = ret.Error(0)
}
return r0
}
// Delete provides a mock function with given fields: id
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 {
return rf(id)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(id)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields: rctx, id
func (_m *JobStore) Get(rctx request.CTX, id string) (*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, id)
}
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.Job); ok {
r0 = rf(rctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
r1 = rf(rctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByStatus provides a mock function with given fields: rctx, status
func (_m *JobStore) GetAllByStatus(rctx request.CTX, status string) ([]*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, status)
}
if rf, ok := ret.Get(0).(func(request.CTX, string) []*model.Job); ok {
r0 = rf(rctx, status)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
r1 = rf(rctx, status)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByType provides a mock function with given fields: rctx, jobType
func (_m *JobStore) GetAllByType(rctx request.CTX, jobType string) ([]*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, jobType)
}
if rf, ok := ret.Get(0).(func(request.CTX, string) []*model.Job); ok {
r0 = rf(rctx, jobType)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
r1 = rf(rctx, jobType)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByTypeAndStatus provides a mock function with given fields: rctx, jobType, status
func (_m *JobStore) GetAllByTypeAndStatus(rctx request.CTX, jobType string, status string) ([]*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, jobType, status)
}
if rf, ok := ret.Get(0).(func(request.CTX, string, string) []*model.Job); ok {
r0 = rf(rctx, jobType, status)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string, string) error); ok {
r1 = rf(rctx, jobType, status)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByTypePage provides a mock function with given fields: rctx, jobType, offset, limit
func (_m *JobStore) GetAllByTypePage(rctx request.CTX, jobType string, offset int, limit int) ([]*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, jobType, offset, limit)
}
if rf, ok := ret.Get(0).(func(request.CTX, string, int, int) []*model.Job); ok {
r0 = rf(rctx, jobType, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string, int, int) error); ok {
r1 = rf(rctx, jobType, offset, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByTypesAndStatusesPage provides a mock function with given fields: rctx, jobType, status, offset, limit
func (_m *JobStore) GetAllByTypesAndStatusesPage(rctx request.CTX, jobType []string, status []string, offset int, limit int) ([]*model.Job, error) {
ret := _m.Called(rctx, jobType, status, offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetAllByTypesAndStatusesPage")
}
var r0 []*model.Job
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX, []string, []string, int, int) ([]*model.Job, error)); ok {
return rf(rctx, jobType, status, offset, limit)
}
if rf, ok := ret.Get(0).(func(request.CTX, []string, []string, int, int) []*model.Job); ok {
r0 = rf(rctx, jobType, status, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, []string, []string, int, int) error); ok {
r1 = rf(rctx, jobType, status, offset, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAllByTypesPage provides a mock function with given fields: rctx, jobTypes, offset, limit
func (_m *JobStore) GetAllByTypesPage(rctx request.CTX, jobTypes []string, offset int, limit int) ([]*model.Job, error) {
ret := _m.Called(rctx, 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 {
return rf(rctx, jobTypes, offset, limit)
}
if rf, ok := ret.Get(0).(func(request.CTX, []string, int, int) []*model.Job); ok {
r0 = rf(rctx, jobTypes, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, []string, int, int) error); ok {
r1 = rf(rctx, jobTypes, offset, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetByTypeAndData provides a mock function with given fields: rctx, jobType, data, useMaster, statuses
func (_m *JobStore) GetByTypeAndData(rctx request.CTX, jobType string, data map[string]string, useMaster bool, statuses ...string) ([]*model.Job, error) {
_va := make([]interface{}, len(statuses))
for _i := range statuses {
_va[_i] = statuses[_i]
}
var _ca []interface{}
_ca = append(_ca, rctx, jobType, data, useMaster)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetByTypeAndData")
}
var r0 []*model.Job
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string, bool, ...string) ([]*model.Job, error)); ok {
return rf(rctx, jobType, data, useMaster, statuses...)
}
if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string, bool, ...string) []*model.Job); ok {
r0 = rf(rctx, jobType, data, useMaster, statuses...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Job)
}
}
if rf, ok := ret.Get(1).(func(request.CTX, string, map[string]string, bool, ...string) error); ok {
r1 = rf(rctx, jobType, data, useMaster, statuses...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCountByStatusAndType provides a mock function with given fields: status, jobType
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 {
return rf(status, jobType)
}
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(status, jobType)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(status, jobType)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetNewestJobByStatusAndType provides a mock function with given fields: status, jobType
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 {
return rf(status, jobType)
}
if rf, ok := ret.Get(0).(func(string, string) *model.Job); ok {
r0 = rf(status, jobType)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(status, jobType)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetNewestJobByStatusesAndType provides a mock function with given fields: statuses, jobType
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 {
return rf(statuses, jobType)
}
if rf, ok := ret.Get(0).(func([]string, string) *model.Job); ok {
r0 = rf(statuses, jobType)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func([]string, string) error); ok {
r1 = rf(statuses, jobType)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Save provides a mock function with given fields: job
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 {
return rf(job)
}
if rf, ok := ret.Get(0).(func(*model.Job) *model.Job); ok {
r0 = rf(job)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(*model.Job) error); ok {
r1 = rf(job)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SaveOnce provides a mock function with given fields: job
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 {
return rf(job)
}
if rf, ok := ret.Get(0).(func(*model.Job) *model.Job); ok {
r0 = rf(job)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(*model.Job) error); ok {
r1 = rf(job)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SaveOnceByTypeAndData provides a mock function with given fields: job, data
func (_m *JobStore) SaveOnceByTypeAndData(job *model.Job, data map[string]string) (*model.Job, error) {
ret := _m.Called(job, data)
if len(ret) == 0 {
panic("no return value specified for SaveOnceByTypeAndData")
}
var r0 *model.Job
var r1 error
if rf, ok := ret.Get(0).(func(*model.Job, map[string]string) (*model.Job, error)); ok {
return rf(job, data)
}
if rf, ok := ret.Get(0).(func(*model.Job, map[string]string) *model.Job); ok {
r0 = rf(job, data)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(*model.Job, map[string]string) error); ok {
r1 = rf(job, data)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateOptimistically provides a mock function with given fields: job, currentStatus
func (_m *JobStore) UpdateOptimistically(job *model.Job, currentStatus string) (*model.Job, error) {
ret := _m.Called(job, currentStatus)
if len(ret) == 0 {
panic("no return value specified for UpdateOptimistically")
}
var r0 *model.Job
var r1 error
if rf, ok := ret.Get(0).(func(*model.Job, string) (*model.Job, error)); ok {
return rf(job, currentStatus)
}
if rf, ok := ret.Get(0).(func(*model.Job, string) *model.Job); ok {
r0 = rf(job, currentStatus)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(*model.Job, string) error); ok {
r1 = rf(job, currentStatus)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateStatus provides a mock function with given fields: id, status
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 {
return rf(id, status)
}
if rf, ok := ret.Get(0).(func(string, string) *model.Job); ok {
r0 = rf(id, status)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(id, status)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateStatusOptimistically provides a mock function with given fields: id, currentStatus, newStatus
func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (*model.Job, error) {
ret := _m.Called(id, currentStatus, newStatus)
if len(ret) == 0 {
panic("no return value specified for UpdateStatusOptimistically")
}
var r0 *model.Job
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string) (*model.Job, error)); ok {
return rf(id, currentStatus, newStatus)
}
if rf, ok := ret.Get(0).(func(string, string, string) *model.Job); ok {
r0 = rf(id, currentStatus, newStatus)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Job)
}
}
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = rf(id, currentStatus, newStatus)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewJobStore creates a new instance of JobStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewJobStore(t interface {
mock.TestingT
Cleanup(func())
}) *JobStore {
mock := &JobStore{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}