diff --git a/Makefile b/Makefile index 4ecac52312..60bc5d99b8 100644 --- a/Makefile +++ b/Makefile @@ -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 := & diff --git a/config.mk b/config.mk index f54403b3a5..688045449f 100644 --- a/config.mk +++ b/config.mk @@ -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 diff --git a/model/cloud.go b/model/cloud.go index 8f3716d9c6..0fe6c6a79a 100644 --- a/model/cloud.go +++ b/model/cloud.go @@ -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"`