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
429 lines
12 KiB
Go
429 lines
12 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"
|
|
)
|
|
|
|
// PropertyFieldStore is an autogenerated mock type for the PropertyFieldStore type
|
|
type PropertyFieldStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// CheckPropertyNameConflict provides a mock function with given fields: field, excludeID
|
|
func (_m *PropertyFieldStore) CheckPropertyNameConflict(field *model.PropertyField, excludeID string) (model.PropertyFieldTargetLevel, error) {
|
|
ret := _m.Called(field, excludeID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckPropertyNameConflict")
|
|
}
|
|
|
|
var r0 model.PropertyFieldTargetLevel
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.PropertyField, string) (model.PropertyFieldTargetLevel, error)); ok {
|
|
return rf(field, excludeID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.PropertyField, string) model.PropertyFieldTargetLevel); ok {
|
|
r0 = rf(field, excludeID)
|
|
} else {
|
|
r0 = ret.Get(0).(model.PropertyFieldTargetLevel)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.PropertyField, string) error); ok {
|
|
r1 = rf(field, excludeID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountForGroup provides a mock function with given fields: groupID, includeDeleted
|
|
func (_m *PropertyFieldStore) CountForGroup(groupID string, includeDeleted bool) (int64, error) {
|
|
ret := _m.Called(groupID, includeDeleted)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountForGroup")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, bool) (int64, error)); ok {
|
|
return rf(groupID, includeDeleted)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
|
|
r0 = rf(groupID, includeDeleted)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
|
r1 = rf(groupID, includeDeleted)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountForGroupObjectType provides a mock function with given fields: groupID, objectType, includeDeleted
|
|
func (_m *PropertyFieldStore) CountForGroupObjectType(groupID string, objectType string, includeDeleted bool) (int64, error) {
|
|
ret := _m.Called(groupID, objectType, includeDeleted)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountForGroupObjectType")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, bool) (int64, error)); ok {
|
|
return rf(groupID, objectType, includeDeleted)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, bool) int64); ok {
|
|
r0 = rf(groupID, objectType, includeDeleted)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
|
|
r1 = rf(groupID, objectType, includeDeleted)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountForTarget provides a mock function with given fields: groupID, targetType, targetID, includeDeleted
|
|
func (_m *PropertyFieldStore) CountForTarget(groupID string, targetType string, targetID string, includeDeleted bool) (int64, error) {
|
|
ret := _m.Called(groupID, targetType, targetID, includeDeleted)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountForTarget")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, bool) (int64, error)); ok {
|
|
return rf(groupID, targetType, targetID, includeDeleted)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, string, bool) int64); ok {
|
|
r0 = rf(groupID, targetType, targetID, includeDeleted)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
|
|
r1 = rf(groupID, targetType, targetID, includeDeleted)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountLinkedFields provides a mock function with given fields: fieldID
|
|
func (_m *PropertyFieldStore) CountLinkedFields(fieldID string) (int64, error) {
|
|
ret := _m.Called(fieldID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountLinkedFields")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
|
return rf(fieldID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
|
r0 = rf(fieldID)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(fieldID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Create provides a mock function with given fields: field
|
|
func (_m *PropertyFieldStore) Create(field *model.PropertyField) (*model.PropertyField, error) {
|
|
ret := _m.Called(field)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Create")
|
|
}
|
|
|
|
var r0 *model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.PropertyField) (*model.PropertyField, error)); ok {
|
|
return rf(field)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.PropertyField) *model.PropertyField); ok {
|
|
r0 = rf(field)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.PropertyField) error); ok {
|
|
r1 = rf(field)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: groupID, id
|
|
func (_m *PropertyFieldStore) Delete(groupID string, id string) error {
|
|
ret := _m.Called(groupID, id)
|
|
|
|
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(groupID, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Get provides a mock function with given fields: rctx, groupID, id
|
|
func (_m *PropertyFieldStore) Get(rctx request.CTX, groupID string, id string) (*model.PropertyField, error) {
|
|
ret := _m.Called(rctx, groupID, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 *model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.PropertyField, error)); ok {
|
|
return rf(rctx, groupID, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.PropertyField); ok {
|
|
r0 = rf(rctx, groupID, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string) error); ok {
|
|
r1 = rf(rctx, groupID, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetFieldByName provides a mock function with given fields: rctx, groupID, targetID, name
|
|
func (_m *PropertyFieldStore) GetFieldByName(rctx request.CTX, groupID string, targetID string, name string) (*model.PropertyField, error) {
|
|
ret := _m.Called(rctx, groupID, targetID, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFieldByName")
|
|
}
|
|
|
|
var r0 *model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string) (*model.PropertyField, error)); ok {
|
|
return rf(rctx, groupID, targetID, name)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string) *model.PropertyField); ok {
|
|
r0 = rf(rctx, groupID, targetID, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string, string) error); ok {
|
|
r1 = rf(rctx, groupID, targetID, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetFieldByNameForObjectType provides a mock function with given fields: rctx, groupID, targetID, objectType, name
|
|
func (_m *PropertyFieldStore) GetFieldByNameForObjectType(rctx request.CTX, groupID string, targetID string, objectType string, name string) (*model.PropertyField, error) {
|
|
ret := _m.Called(rctx, groupID, targetID, objectType, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFieldByNameForObjectType")
|
|
}
|
|
|
|
var r0 *model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, string) (*model.PropertyField, error)); ok {
|
|
return rf(rctx, groupID, targetID, objectType, name)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, string) *model.PropertyField); ok {
|
|
r0 = rf(rctx, groupID, targetID, objectType, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string, string, string) error); ok {
|
|
r1 = rf(rctx, groupID, targetID, objectType, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetForGroup provides a mock function with given fields: rctx, groupID
|
|
func (_m *PropertyFieldStore) GetForGroup(rctx request.CTX, groupID string) ([]*model.PropertyField, error) {
|
|
ret := _m.Called(rctx, groupID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetForGroup")
|
|
}
|
|
|
|
var r0 []*model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.PropertyField, error)); ok {
|
|
return rf(rctx, groupID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) []*model.PropertyField); ok {
|
|
r0 = rf(rctx, groupID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
|
|
r1 = rf(rctx, groupID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetMany provides a mock function with given fields: rctx, groupID, ids
|
|
func (_m *PropertyFieldStore) GetMany(rctx request.CTX, groupID string, ids []string) ([]*model.PropertyField, error) {
|
|
ret := _m.Called(rctx, groupID, ids)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetMany")
|
|
}
|
|
|
|
var r0 []*model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) ([]*model.PropertyField, error)); ok {
|
|
return rf(rctx, groupID, ids)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) []*model.PropertyField); ok {
|
|
r0 = rf(rctx, groupID, ids)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, []string) error); ok {
|
|
r1 = rf(rctx, groupID, ids)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SearchPropertyFields provides a mock function with given fields: opts
|
|
func (_m *PropertyFieldStore) SearchPropertyFields(opts model.PropertyFieldSearchOpts) ([]*model.PropertyField, error) {
|
|
ret := _m.Called(opts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SearchPropertyFields")
|
|
}
|
|
|
|
var r0 []*model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(model.PropertyFieldSearchOpts) ([]*model.PropertyField, error)); ok {
|
|
return rf(opts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(model.PropertyFieldSearchOpts) []*model.PropertyField); ok {
|
|
r0 = rf(opts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(model.PropertyFieldSearchOpts) error); ok {
|
|
r1 = rf(opts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Update provides a mock function with given fields: groupID, fields, expectedUpdateAts
|
|
func (_m *PropertyFieldStore) Update(groupID string, fields []*model.PropertyField, expectedUpdateAts map[string]int64) ([]*model.PropertyField, error) {
|
|
ret := _m.Called(groupID, fields, expectedUpdateAts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Update")
|
|
}
|
|
|
|
var r0 []*model.PropertyField
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, []*model.PropertyField, map[string]int64) ([]*model.PropertyField, error)); ok {
|
|
return rf(groupID, fields, expectedUpdateAts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, []*model.PropertyField, map[string]int64) []*model.PropertyField); ok {
|
|
r0 = rf(groupID, fields, expectedUpdateAts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PropertyField)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, []*model.PropertyField, map[string]int64) error); ok {
|
|
r1 = rf(groupID, fields, expectedUpdateAts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewPropertyFieldStore creates a new instance of PropertyFieldStore. 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 NewPropertyFieldStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *PropertyFieldStore {
|
|
mock := &PropertyFieldStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|