Files
team/server/channels/store/storetest/mocks/PropertyFieldStore.go
0d847ef67c Upgrade Go to 1.24.3 (#31220)
* Upgrade Go to 1.24.3

Updates the following files:
- server/.go-version: 1.23.9 → 1.24.3
- server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye
- server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3
- server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3

Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking:
- Added response() helper function in slashcommands/util.go for simple string responses
- Removed unused responsef() function from slashcommands/util.go
- Replaced responsef() with response() for translated strings that don't need formatting
- Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation
- Updated marketplace buildURL to handle format strings conditionally

* Update generated mocks for Go 1.24.3

Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3.
This addresses mock generation failures that occurred with the Go upgrade.

* Update to bookworm and fix non-existent sha

Signed-off-by: Stavros Foteinopoulos <[email protected]>

* fix non-constant format string

---------

Signed-off-by: Stavros Foteinopoulos <[email protected]>

Co-authored-by: Stavros Foteinopoulos <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2025-06-10 15:04:57 -03:00

256 lines
6.5 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"
mock "github.com/stretchr/testify/mock"
)
// PropertyFieldStore is an autogenerated mock type for the PropertyFieldStore type
type PropertyFieldStore struct {
mock.Mock
}
// 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
}
// 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: groupID, id
func (_m *PropertyFieldStore) Get(groupID string, id string) (*model.PropertyField, error) {
ret := _m.Called(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(string, string) (*model.PropertyField, error)); ok {
return rf(groupID, id)
}
if rf, ok := ret.Get(0).(func(string, string) *model.PropertyField); ok {
r0 = rf(groupID, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PropertyField)
}
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(groupID, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetFieldByName provides a mock function with given fields: groupID, targetID, name
func (_m *PropertyFieldStore) GetFieldByName(groupID string, targetID string, name string) (*model.PropertyField, error) {
ret := _m.Called(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(string, string, string) (*model.PropertyField, error)); ok {
return rf(groupID, targetID, name)
}
if rf, ok := ret.Get(0).(func(string, string, string) *model.PropertyField); ok {
r0 = rf(groupID, targetID, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PropertyField)
}
}
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = rf(groupID, targetID, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetMany provides a mock function with given fields: groupID, ids
func (_m *PropertyFieldStore) GetMany(groupID string, ids []string) ([]*model.PropertyField, error) {
ret := _m.Called(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(string, []string) ([]*model.PropertyField, error)); ok {
return rf(groupID, ids)
}
if rf, ok := ret.Get(0).(func(string, []string) []*model.PropertyField); ok {
r0 = rf(groupID, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.PropertyField)
}
}
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
r1 = rf(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
func (_m *PropertyFieldStore) Update(groupID string, fields []*model.PropertyField) ([]*model.PropertyField, error) {
ret := _m.Called(groupID, fields)
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) ([]*model.PropertyField, error)); ok {
return rf(groupID, fields)
}
if rf, ok := ret.Get(0).(func(string, []*model.PropertyField) []*model.PropertyField); ok {
r0 = rf(groupID, fields)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.PropertyField)
}
}
if rf, ok := ret.Get(1).(func(string, []*model.PropertyField) error); ok {
r1 = rf(groupID, fields)
} 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
}