MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x because this would have been a breaking change again. https://mattermost.atlassian.net/browse/MM-53032 ```release-note Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8. For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a6d1d38b27
Коммит
efaa6264cc
@@ -58,7 +58,7 @@ endif
|
|||||||
MM_SERVER_PATH ?= $(PWD)
|
MM_SERVER_PATH ?= $(PWD)
|
||||||
MMCTL_BUILD_TAGS =
|
MMCTL_BUILD_TAGS =
|
||||||
MMCTL_TESTFLAGS = -timeout 30m -race -v
|
MMCTL_TESTFLAGS = -timeout 30m -race -v
|
||||||
MMCTL_PKG = github.com/mattermost/mattermost-server/server/v8/cmd/mmctl/commands
|
MMCTL_PKG = github.com/mattermost/mattermost/server/v8/cmd/mmctl/commands
|
||||||
LDFLAGS += -X "$(MMCTL_PKG).gitCommit=$(BUILD_HASH)"
|
LDFLAGS += -X "$(MMCTL_PKG).gitCommit=$(BUILD_HASH)"
|
||||||
LDFLAGS += -X "$(MMCTL_PKG).gitTreeState=$(GIT_TREESTATE)"
|
LDFLAGS += -X "$(MMCTL_PKG).gitTreeState=$(GIT_TREESTATE)"
|
||||||
LDFLAGS += -X "$(MMCTL_PKG).buildDate=$(BUILD_DATE)"
|
LDFLAGS += -X "$(MMCTL_PKG).buildDate=$(BUILD_DATE)"
|
||||||
@@ -70,7 +70,7 @@ BUILD_ENTERPRISE_READY = false
|
|||||||
BUILD_TYPE_NAME = team
|
BUILD_TYPE_NAME = team
|
||||||
BUILD_HASH_ENTERPRISE = none
|
BUILD_HASH_ENTERPRISE = none
|
||||||
ifneq ($(wildcard $(BUILD_ENTERPRISE_DIR)/.),)
|
ifneq ($(wildcard $(BUILD_ENTERPRISE_DIR)/.),)
|
||||||
MMCTL_TESTFLAGS += -ldflags '-X "$(MMCTL_PKG).EnableEnterpriseTests=true" -X "github.com/mattermost/mattermost-server/server/public/model.BuildEnterpriseReady=true"'
|
MMCTL_TESTFLAGS += -ldflags '-X "$(MMCTL_PKG).EnableEnterpriseTests=true" -X "github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=true"'
|
||||||
MMCTL_BUILD_TAGS += enterprise
|
MMCTL_BUILD_TAGS += enterprise
|
||||||
|
|
||||||
ifeq ($(BUILD_ENTERPRISE),true)
|
ifeq ($(BUILD_ENTERPRISE),true)
|
||||||
@@ -117,11 +117,11 @@ GOFLAGS ?= $(GOFLAGS:)
|
|||||||
export GOBIN ?= $(PWD)/bin
|
export GOBIN ?= $(PWD)/bin
|
||||||
GO=go
|
GO=go
|
||||||
DELVE=dlv
|
DELVE=dlv
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.BuildNumber=$(BUILD_NUMBER)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.BuildNumber=$(BUILD_NUMBER)"
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.BuildDate=$(BUILD_DATE)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.BuildDate=$(BUILD_DATE)"
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.BuildHash=$(BUILD_HASH)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.BuildHash=$(BUILD_HASH)"
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)"
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)"
|
||||||
|
|
||||||
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
|
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
|
||||||
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
|
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
|
||||||
@@ -206,7 +206,7 @@ endif
|
|||||||
include config.mk
|
include config.mk
|
||||||
include build/*.mk
|
include build/*.mk
|
||||||
|
|
||||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/server/public/model.MockCWS=$(MM_ENABLE_CWS_MOCK)"
|
LDFLAGS += -X "github.com/mattermost/mattermost/server/public/model.MockCWS=$(MM_ENABLE_CWS_MOCK)"
|
||||||
|
|
||||||
RUN_IN_BACKGROUND ?=
|
RUN_IN_BACKGROUND ?=
|
||||||
ifeq ($(RUN_SERVER_IN_BACKGROUND),true)
|
ifeq ($(RUN_SERVER_IN_BACKGROUND),true)
|
||||||
@@ -399,7 +399,7 @@ platform-mocks: ## Creates mocks for platform interfaces.
|
|||||||
|
|
||||||
mmctl-mocks: ## Creates mocks for mmctl
|
mmctl-mocks: ## Creates mocks for mmctl
|
||||||
$(GO) install github.com/golang/mock/mockgen@v1.6.0
|
$(GO) install github.com/golang/mock/mockgen@v1.6.0
|
||||||
$(GOBIN)/mockgen -destination=cmd/mmctl/mocks/client_mock.go -copyright_file=cmd/mmctl/mocks/copyright.txt -package=mocks github.com/mattermost/mattermost-server/server/v8/cmd/mmctl/client Client
|
$(GOBIN)/mockgen -destination=cmd/mmctl/mocks/client_mock.go -copyright_file=cmd/mmctl/mocks/copyright.txt -package=mocks github.com/mattermost/mattermost/server/v8/cmd/mmctl/client Client
|
||||||
|
|
||||||
pluginapi: ## Generates api and hooks glue code for plugins
|
pluginapi: ## Generates api and hooks glue code for plugins
|
||||||
$(GO) generate $(GOFLAGS) ./public/plugin
|
$(GO) generate $(GOFLAGS) ./public/plugin
|
||||||
@@ -575,20 +575,20 @@ run-server: setup-go-work prepackaged-binaries validate-go-version start-docker
|
|||||||
debug-server: start-docker ## Compile and start server using delve.
|
debug-server: start-docker ## Compile and start server using delve.
|
||||||
mkdir -p $(BUILD_WEBAPP_DIR)/channels/dist/files
|
mkdir -p $(BUILD_WEBAPP_DIR)/channels/dist/files
|
||||||
$(DELVE) debug $(PLATFORM_FILES) --build-flags="-ldflags '\
|
$(DELVE) debug $(PLATFORM_FILES) --build-flags="-ldflags '\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildNumber=$(BUILD_NUMBER)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildNumber=$(BUILD_NUMBER)\
|
||||||
-X \"github.com/mattermost/mattermost-server/server/public/model.BuildDate=$(BUILD_DATE)\"\
|
-X \"github.com/mattermost/mattermost/server/public/model.BuildDate=$(BUILD_DATE)\"\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildHash=$(BUILD_HASH)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildHash=$(BUILD_HASH)\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)'"
|
-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)'"
|
||||||
|
|
||||||
debug-server-headless: start-docker ## Debug server from within an IDE like VSCode or IntelliJ.
|
debug-server-headless: start-docker ## Debug server from within an IDE like VSCode or IntelliJ.
|
||||||
mkdir -p $(BUILD_WEBAPP_DIR)/channels/dist/files
|
mkdir -p $(BUILD_WEBAPP_DIR)/channels/dist/files
|
||||||
$(DELVE) debug --headless --listen=:2345 --api-version=2 --accept-multiclient $(PLATFORM_FILES) --build-flags="-ldflags '\
|
$(DELVE) debug --headless --listen=:2345 --api-version=2 --accept-multiclient $(PLATFORM_FILES) --build-flags="-ldflags '\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildNumber=$(BUILD_NUMBER)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildNumber=$(BUILD_NUMBER)\
|
||||||
-X \"github.com/mattermost/mattermost-server/server/public/model.BuildDate=$(BUILD_DATE)\"\
|
-X \"github.com/mattermost/mattermost/server/public/model.BuildDate=$(BUILD_DATE)\"\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildHash=$(BUILD_HASH)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildHash=$(BUILD_HASH)\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
||||||
-X github.com/mattermost/mattermost-server/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)'"
|
-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)'"
|
||||||
|
|
||||||
run-cli: start-docker ## Runs CLI.
|
run-cli: start-docker ## Runs CLI.
|
||||||
@echo Running mattermost for development
|
@echo Running mattermost for development
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AdminSetPasswordData struct {
|
type AdminSetPasswordData struct {
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/app"
|
"github.com/mattermost/mattermost/server/v8/boards/app"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestErrorResponse(t *testing.T) {
|
func TestErrorResponse(t *testing.T) {
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// makeAuditRecord creates an audit record pre-populated with data from the request.
|
// makeAuditRecord creates an audit record pre-populated with data from the request.
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/services/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerAuthRoutes(r *mux.Router) {
|
func (a *API) registerAuthRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerBlocksRoutes(r *mux.Router) {
|
func (a *API) registerBlocksRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerBoardsRoutes(r *mux.Router) {
|
func (a *API) registerBoardsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerBoardsAndBlocksRoutes(r *mux.Router) {
|
func (a *API) registerBoardsAndBlocksRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerCategoriesRoutes(r *mux.Router) {
|
func (a *API) registerCategoriesRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerChannelsRoutes(r *mux.Router) {
|
func (a *API) registerChannelsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerContentBlocksRoutes(r *mux.Router) {
|
func (a *API) registerContentBlocksRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/app"
|
"github.com/mattermost/mattermost/server/v8/boards/app"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/web"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FileUploadResponse is the response to a file upload
|
// FileUploadResponse is the response to a file upload
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerInsightsRoutes(r *mux.Router) {
|
func (a *API) registerInsightsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerLimitsRoutes(r *mux.Router) {
|
func (a *API) registerLimitsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerMembersRoutes(r *mux.Router) {
|
func (a *API) registerMembersRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerOnboardingRoutes(r *mux.Router) {
|
func (a *API) registerOnboardingRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerSearchRoutes(r *mux.Router) {
|
func (a *API) registerSearchRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrTurningOnSharing = errors.New("turning on sharing for board failed, see log for details")
|
var ErrTurningOnSharing = errors.New("turning on sharing for board failed, see log for details")
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerStatisticsRoutes(r *mux.Router) {
|
func (a *API) registerStatisticsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerSubscriptionsRoutes(r *mux.Router) {
|
func (a *API) registerSubscriptionsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/app"
|
"github.com/mattermost/mattermost/server/v8/boards/app"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHello(t *testing.T) {
|
func TestHello(t *testing.T) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerTeamsRoutes(r *mux.Router) {
|
func (a *API) registerTeamsRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerTemplatesRoutes(r *mux.Router) {
|
func (a *API) registerTemplatesRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) registerUsersRoutes(r *mux.Router) {
|
func (a *API) registerUsersRoutes(r *mux.Router) {
|
||||||
|
|||||||
@@ -8,19 +8,19 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/metrics"
|
"github.com/mattermost/mattermost/server/v8/boards/services/metrics"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/notify"
|
"github.com/mattermost/mattermost/server/v8/boards/services/notify"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/webhook"
|
"github.com/mattermost/mattermost/server/v8/boards/services/webhook"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/ws"
|
"github.com/mattermost/mattermost/server/v8/boards/ws"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetConfig(t *testing.T) {
|
func TestSetConfig(t *testing.T) {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/services/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/services/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var mockUser = &model.User{
|
var mockUser = &model.User{
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/notify"
|
"github.com/mattermost/mattermost/server/v8/boards/services/notify"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrBlocksFromMultipleBoards = errors.New("the block set contain blocks from multiple boards")
|
var ErrBlocksFromMultipleBoards = errors.New("the block set contain blocks from multiple boards")
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type blockError struct {
|
type blockError struct {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/notify"
|
"github.com/mattermost/mattermost/server/v8/boards/services/notify"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/notify"
|
"github.com/mattermost/mattermost/server/v8/boards/services/notify"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) CreateBoardsAndBlocks(bab *model.BoardsAndBlocks, userID string, addMember bool) (*model.BoardsAndBlocks, error) {
|
func (a *App) CreateBoardsAndBlocks(bab *model.BoardsAndBlocks, userID string, addMember bool) (*model.BoardsAndBlocks, error) {
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ package app
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAddMemberToBoard(t *testing.T) {
|
func TestAddMemberToBoard(t *testing.T) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package app
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) CreateCard(card *model.Card, boardID string, userID string, disableNotify bool) (*model.Card, error) {
|
func (a *App) CreateCard(card *model.Card, boardID string, userID string, disableNotify bool) (*model.Card, error) {
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCreateCard(t *testing.T) {
|
func TestCreateCard(t *testing.T) {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errCategoryNotFound = errors.New("category ID specified in input does not exist for user")
|
var errCategoryNotFound = errors.New("category ID specified in input does not exist for user")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultCategoryBoards = "Boards"
|
const defaultCategoryBoards = "Boards"
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ package app
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetUserCategoryBoards(t *testing.T) {
|
func TestGetUserCategoryBoards(t *testing.T) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCreateCategory(t *testing.T) {
|
func TestCreateCategory(t *testing.T) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) GetClientConfig() *model.ClientConfig {
|
func (a *App) GetClientConfig() *model.ClientConfig {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetClientConfig(t *testing.T) {
|
func TestGetClientConfig(t *testing.T) {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrNilPluginAPI = errors.New("server not running in plugin mode")
|
var ErrNilPluginAPI = errors.New("server not running in plugin mode")
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
mockservicesapi "github.com/mattermost/mattermost-server/server/v8/boards/model/mocks"
|
mockservicesapi "github.com/mattermost/mattermost/server/v8/boards/model/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIsCloud(t *testing.T) {
|
func TestIsCloud(t *testing.T) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import "github.com/mattermost/mattermost-server/server/v8/boards/model"
|
import "github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
func (a *App) GetBoardsForCompliance(opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) {
|
func (a *App) GetBoardsForCompliance(opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) {
|
||||||
return a.store.GetBoardsForCompliance(opts)
|
return a.store.GetBoardsForCompliance(opts)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) MoveContentBlock(block *model.Block, dstBlock *model.Block, where string, userID string) error {
|
func (a *App) MoveContentBlock(block *model.Block, dstBlock *model.Block, where string, userID string) error {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type contentOrderMatcher struct {
|
type contentOrderMatcher struct {
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
|
|
||||||
"github.com/wiggin77/merror"
|
"github.com/wiggin77/merror"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errEmptyFilename = errors.New("IsFileArchived: empty filename not allowed")
|
var errEmptyFilename = errors.New("IsFileArchived: empty filename not allowed")
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import (
|
|||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/plugin/plugintest/mock"
|
"github.com/mattermost/mattermost/server/public/plugin/plugintest/mock"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore/mocks"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -7,18 +7,18 @@ import (
|
|||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/metrics"
|
"github.com/mattermost/mattermost/server/v8/boards/services/metrics"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/mmpermissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions/mmpermissions"
|
||||||
mmpermissionsMocks "github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/mmpermissions/mocks"
|
mmpermissionsMocks "github.com/mattermost/mattermost/server/v8/boards/services/permissions/mmpermissions/mocks"
|
||||||
permissionsMocks "github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/mocks"
|
permissionsMocks "github.com/mattermost/mattermost/server/v8/boards/services/permissions/mocks"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store/mockstore"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store/mockstore"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/webhook"
|
"github.com/mattermost/mattermost/server/v8/boards/services/webhook"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/ws"
|
"github.com/mattermost/mattermost/server/v8/boards/ws"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore/mocks"
|
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestHelper struct {
|
type TestHelper struct {
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ import (
|
|||||||
|
|
||||||
"github.com/krolaw/zipstream"
|
"github.com/krolaw/zipstream"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestApp_ImportArchive(t *testing.T) {
|
func TestApp_ImportArchive(t *testing.T) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// initialize is called when the App is first created.
|
// initialize is called when the App is first created.
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package app
|
|||||||
import (
|
import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) GetTeamBoardsInsights(userID string, teamID string, opts *mm_model.InsightsOpts) (*model.BoardInsightsList, error) {
|
func (a *App) GetTeamBoardsInsights(userID string, teamID string, opts *mm_model.InsightsOpts) (*model.BoardInsightsList, error) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var mockInsightsBoards = []*model.Board{
|
var mockInsightsBoards = []*model.Board{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ package app
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) HasPermissionToBoard(userID, boardID string, permission *mm_model.Permission) bool {
|
func (a *App) HasPermissionToBoard(userID, boardID string, permission *mm_model.Permission) bool {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServerMetadata struct {
|
type ServerMetadata struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetServerMetadata(t *testing.T) {
|
func TestGetServerMetadata(t *testing.T) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) GetSharing(boardID string) (*model.Sharing, error) {
|
func (a *App) GetSharing(boardID string) (*model.Sharing, error) {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetSharing(t *testing.T) {
|
func TestGetSharing(t *testing.T) {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) CreateSubscription(sub *model.Subscription) (*model.Subscription, error) {
|
func (a *App) CreateSubscription(sub *model.Subscription) (*model.Subscription, error) {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) GetRootTeam() (*model.Team, error) {
|
func (a *App) GetRootTeam() (*model.Team, error) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errInvalidTeam = errors.New("invalid team id")
|
var errInvalidTeam = errors.New("invalid team id")
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/assets"
|
"github.com/mattermost/mattermost/server/v8/boards/assets"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/plugin/plugintest/mock"
|
"github.com/mattermost/mattermost/server/public/plugin/plugintest/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestApp_initializeTemplates(t *testing.T) {
|
func TestApp_initializeTemplates(t *testing.T) {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) GetTeamUsers(teamID string, asGuestID string) ([]*model.User, error) {
|
func (a *App) GetTeamUsers(teamID string, asGuestID string) ([]*model.User, error) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSearchUsers(t *testing.T) {
|
func TestSearchUsers(t *testing.T) {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ package auth
|
|||||||
import (
|
import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthInterface interface {
|
type AuthInterface interface {
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/localpermissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions/localpermissions"
|
||||||
mockpermissions "github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/mocks"
|
mockpermissions "github.com/mattermost/mattermost/server/v8/boards/services/permissions/mocks"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store/mockstore"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store/mockstore"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestHelper struct {
|
type TestHelper struct {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/mattermost/mattermost-server/server/v8/boards/auth (interfaces: AuthInterface)
|
// Source: github.com/mattermost/mattermost/server/v8/boards/auth (interfaces: AuthInterface)
|
||||||
|
|
||||||
// Package mocks is a generated GoMock package.
|
// Package mocks is a generated GoMock package.
|
||||||
package mocks
|
package mocks
|
||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
model "github.com/mattermost/mattermost-server/server/v8/boards/model"
|
model "github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockAuthInterface is a mock of AuthInterface interface.
|
// MockAuthInterface is a mock of AuthInterface interface.
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/api"
|
"github.com/mattermost/mattermost/server/v8/boards/api"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/client"
|
"github.com/mattermost/mattermost/server/v8/boards/client"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package integrationtests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/server"
|
"github.com/mattermost/mattermost/server/v8/boards/server"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/model"
|
"github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetConfiguration(t *testing.T) {
|
func TestSetConfiguration(t *testing.T) {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCreateCard(t *testing.T) {
|
func TestCreateCard(t *testing.T) {
|
||||||
|
|||||||
@@ -10,19 +10,19 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/client"
|
"github.com/mattermost/mattermost/server/v8/boards/client"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/server"
|
"github.com/mattermost/mattermost/server/v8/boards/server"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/services/auth"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/config"
|
"github.com/mattermost/mattermost/server/v8/boards/services/config"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/localpermissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions/localpermissions"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/permissions/mmpermissions"
|
"github.com/mattermost/mattermost/server/v8/boards/services/permissions/mmpermissions"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store/sqlstore"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store/sqlstore"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import (
|
|||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/server"
|
"github.com/mattermost/mattermost/server/v8/boards/server"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/ws"
|
"github.com/mattermost/mattermost/server/v8/boards/ws"
|
||||||
|
|
||||||
mockservicesapi "github.com/mattermost/mattermost-server/server/v8/boards/model/mocks"
|
mockservicesapi "github.com/mattermost/mattermost/server/v8/boards/model/mocks"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestExportBoard(t *testing.T) {
|
func TestExportBoard(t *testing.T) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/client"
|
"github.com/mattermost/mattermost/server/v8/boards/client"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Clients struct {
|
type Clients struct {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errTestStore = errors.New("plugin test store error")
|
var errTestStore = errors.New("plugin test store error")
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSharing(t *testing.T) {
|
func TestSharing(t *testing.T) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSidebar(t *testing.T) {
|
func TestSidebar(t *testing.T) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/client"
|
"github.com/mattermost/mattermost/server/v8/boards/client"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStatisticsLocalMode(t *testing.T) {
|
func TestStatisticsLocalMode(t *testing.T) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/client"
|
"github.com/mattermost/mattermost/server/v8/boards/client"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func createTestSubscriptions(client *client.Client, num int) ([]*model.Subscription, string, error) {
|
func createTestSubscriptions(client *client.Client, num int) ([]*model.Subscription, string, error) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
package integrationtests
|
package integrationtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/store"
|
"github.com/mattermost/mattermost/server/v8/boards/services/store"
|
||||||
|
|
||||||
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
mm_model "github.com/mattermost/mattermost/server/public/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestStore struct {
|
type TestStore struct {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/model"
|
"github.com/mattermost/mattermost/server/v8/boards/model"
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/auth"
|
"github.com/mattermost/mattermost/server/v8/boards/services/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/services/audit"
|
"github.com/mattermost/mattermost/server/v8/boards/services/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Block is the basic data unit
|
// Block is the basic data unit
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ package model
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/v8/boards/utils"
|
"github.com/mattermost/mattermost/server/v8/boards/utils"
|
||||||
|
|
||||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateBlockIDs generates new IDs for all the blocks of the list,
|
// GenerateBlockIDs generates new IDs for all the blocks of the list,
|
||||||
|
|||||||
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Ссылка в новой задаче
Block a user