MM-57759: Bump mockery to version 2.42.2 to support go 1.22^ (#26761)

Этот коммит содержится в:
Ezekiel
2024-04-12 16:38:34 +08:00
коммит произвёл GitHub
родитель 92f11f8971
Коммит 98712737e6
84 изменённых файлов: 5378 добавлений и 504 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@@ -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)

Просмотреть файл

@@ -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)