mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* add request context * move initialialization to server * use app interface instead of global app functions * remove app context from webconn * cleanup * remove duplicated services * move context to separate package * remove finalize init method and move content to NewServer function * restart workers and schedulers after adding license for tests * reflect review comments Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
119 lines
2.4 KiB
Go
119 lines
2.4 KiB
Go
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make einterfaces-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
model "github.com/mattermost/mattermost-server/v5/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// AppContextInterface is an autogenerated mock type for the AppContextInterface type
|
|
type AppContextInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AcceptLanguage provides a mock function with given fields:
|
|
func (_m *AppContextInterface) AcceptLanguage() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IpAddress provides a mock function with given fields:
|
|
func (_m *AppContextInterface) IpAddress() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Path provides a mock function with given fields:
|
|
func (_m *AppContextInterface) Path() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// RequestId provides a mock function with given fields:
|
|
func (_m *AppContextInterface) RequestId() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Session provides a mock function with given fields:
|
|
func (_m *AppContextInterface) Session() *model.Session {
|
|
ret := _m.Called()
|
|
|
|
var r0 *model.Session
|
|
if rf, ok := ret.Get(0).(func() *model.Session); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Session)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// T provides a mock function with given fields: translationID, args
|
|
func (_m *AppContextInterface) T(translationID string, args ...interface{}) string {
|
|
var _ca []interface{}
|
|
_ca = append(_ca, translationID)
|
|
_ca = append(_ca, args...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func(string, ...interface{}) string); ok {
|
|
r0 = rf(translationID, args...)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UserAgent provides a mock function with given fields:
|
|
func (_m *AppContextInterface) UserAgent() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|