Adding changes to separate unit tests and integration tests (#13670)
* Introducing unit (not integration) tests for the app layer * Initial support for unit tests at the API * Adding unit tests support to the store layer * Add unit tests support in commands * Adding last tests needed for run unit tests properly * Fixing govet * Removing some duplication * Fixing tests * Fixing tests * Not compiling test helpers with the main module for api * Revert "Not compiling test helpers with the main module for api" This reverts commit 36a199bbe0f7503f665f5d6c7b41c53aabc2e54f. * Fixing tests * Fixing unit tests * More consistency between api4/apiteslib.go and app/helper_test.go * Renaming things to make more obvious the new Setup functions purpose * Reverting change in go.sum * Start with empty mock for app layer * Start with empty mock for api layer * Start with empty mock for web layer * Renaming SetupWithStoreMockConfig to SetupConfigWithStoreMock * Fixing tests on web package * Removing unnecesary function
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cd36c9f041
Коммит
7035e09fe9
14
Makefile
14
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries
|
||||
.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries test-server test-server-quick test-server-race
|
||||
|
||||
ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
@@ -81,9 +81,6 @@ DIST_PATH=$(DIST_ROOT)/mattermost
|
||||
# Tests
|
||||
TESTS=.
|
||||
|
||||
TESTFLAGS ?= -short
|
||||
TESTFLAGSEE ?= -short
|
||||
|
||||
# Packages lists
|
||||
TE_PACKAGES=$(shell $(GO) list ./...)
|
||||
|
||||
@@ -312,6 +309,15 @@ else
|
||||
endif
|
||||
./scripts/test.sh "$(GO)" "$(GOFLAGS)" "$(ALL_PACKAGES)" "$(TESTS)" "$(TESTFLAGS)" "$(GOBIN)"
|
||||
|
||||
test-server-quick: ## Runs only quick tests.
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
@echo Running all tests
|
||||
$(GO) test $(GOFLAGS) -short $(ALL_PACKAGES)
|
||||
else
|
||||
@echo Running only TE tests
|
||||
$(GO) test $(GOFLAGS) -short $(TE_PACKAGES)
|
||||
endif
|
||||
|
||||
internal-test-web-client: ## Runs web client tests.
|
||||
$(GO) run $(GOFLAGS) $(PLATFORM_FILES) test web_client_tests
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user