[MM-33662] - Mock out CWS in enterprise code (#17305)

* [MM-33662] - Mock out CWS in enterprise code

* Feedback impl

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Allan Guwatudde
2021-04-22 15:25:56 +03:00
committed by GitHub
parent 5f9870ac06
commit 0b2c0832f1
3 changed files with 7 additions and 0 deletions

View File

@@ -143,6 +143,8 @@ all: run ## Alias for 'run'.
include config.mk
include build/*.mk
LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.MockCWS=$(MM_ENABLE_CWS_MOCK)"
RUN_IN_BACKGROUND ?=
ifeq ($(RUN_SERVER_IN_BACKGROUND),true)
RUN_IN_BACKGROUND := &

View File

@@ -22,3 +22,6 @@ RUN_SERVER_IN_BACKGROUND ?= true
#
# Posible options: test or qa
LDAP_DATA ?= test
# Mock the CWS.
MM_ENABLE_CWS_MOCK ?= false

View File

@@ -14,6 +14,8 @@ const (
InviteLimitation = "invite"
)
var MockCWS string
// Product model represents a product on the cloud system.
type Product struct {
ID string `json:"id"`