Add mocks, layers and generated as rules to the make file (#20585)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b99bd0d049
Коммит
58fea61cc4
@@ -170,8 +170,8 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |
|
command: |
|
||||||
cd mattermost-server
|
cd mattermost-server
|
||||||
make einterfaces-mocks store-mocks
|
make mocks
|
||||||
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make einterfaces-mocks store-mocks`"; exit 1; fi
|
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi
|
||||||
|
|
||||||
check-email-templates:
|
check-email-templates:
|
||||||
docker:
|
docker:
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -390,6 +390,12 @@ email-mocks: ## Creates mocks for misc interfaces.
|
|||||||
pluginapi: ## Generates api and hooks glue code for plugins
|
pluginapi: ## Generates api and hooks glue code for plugins
|
||||||
$(GO) generate $(GOFLAGS) ./plugin
|
$(GO) generate $(GOFLAGS) ./plugin
|
||||||
|
|
||||||
|
mocks: store-mocks telemetry-mocks filestore-mocks ldap-mocks plugin-mocks einterfaces-mocks searchengine-mocks sharedchannel-mocks misc-mocks email-mocks
|
||||||
|
|
||||||
|
layers: app-layers store-layers pluginapi
|
||||||
|
|
||||||
|
generated: mocks layers
|
||||||
|
|
||||||
check-prereqs: ## Checks prerequisite software status.
|
check-prereqs: ## Checks prerequisite software status.
|
||||||
./scripts/prereq-check.sh
|
./scripts/prereq-check.sh
|
||||||
|
|
||||||
|
|||||||
@@ -202,11 +202,11 @@ func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *mod
|
|||||||
|
|
||||||
// GetOrCreateDirectChannel provides a mock function with given fields: c, userId, otherUserId, channelOptions
|
// GetOrCreateDirectChannel provides a mock function with given fields: c, userId, otherUserId, channelOptions
|
||||||
func (_m *MockAppIface) GetOrCreateDirectChannel(c *request.Context, userId string, otherUserId string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) {
|
func (_m *MockAppIface) GetOrCreateDirectChannel(c *request.Context, userId string, otherUserId string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) {
|
||||||
_va := make([]any, len(channelOptions))
|
_va := make([]interface{}, len(channelOptions))
|
||||||
for _i := range channelOptions {
|
for _i := range channelOptions {
|
||||||
_va[_i] = channelOptions[_i]
|
_va[_i] = channelOptions[_i]
|
||||||
}
|
}
|
||||||
var _ca []any
|
var _ca []interface{}
|
||||||
_ca = append(_ca, c, userId, otherUserId)
|
_ca = append(_ca, c, userId, otherUserId)
|
||||||
_ca = append(_ca, _va...)
|
_ca = append(_ca, _va...)
|
||||||
ret := _m.Called(_ca...)
|
ret := _m.Called(_ca...)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user