summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 30 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 173f8dea8..980a9b89d 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,14 @@ start-docker:
docker start mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 0 ]; then \
+ echo starting mattermost-inbucket; \
+ docker run --name mattermost-inbucket -p 9000:10080 -p 2500:10025 -d jhillyerd/inbucket:latest > /dev/null; \
+ elif [ $(shell docker ps | grep -ci mattermost-inbucket) -eq 0 ]; then \
+ echo restarting mattermost-inbucket; \
+ docker start mattermost-inbucket > /dev/null; \
+ fi
+
ifeq ($(BUILD_ENTERPRISE_READY),true)
@echo Ldap test user test.one
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 0 ]; then \
@@ -132,6 +140,11 @@ stop-docker:
docker stop mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
+ echo stopping mattermost-inbucket; \
+ docker stop mattermost-inbucket > /dev/null; \
+ fi
+
clean-docker:
@echo Removing docker containers
@@ -159,6 +172,12 @@ clean-docker:
docker rm -v mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
+ echo removing mattermost-inbucket; \
+ docker stop mattermost-inbucket > /dev/null; \
+ docker rm -v mattermost-inbucket > /dev/null; \
+ fi
+
check-client-style:
@echo Checking client style
@@ -184,17 +203,19 @@ test-server: start-docker prepare-enterprise
echo "mode: count" > cover.out
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=650s -covermode=count -coverprofile=capi.out ./api || exit 1
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=60s -covermode=count -coverprofile=capp.out ./app || exit 1
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=60s -covermode=count -coverprofile=cmodel.out ./model || exit 1
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s -covermode=count -coverprofile=cstore.out ./store || exit 1
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s -covermode=count -coverprofile=cutils.out ./utils || exit 1
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s -covermode=count -coverprofile=cweb.out ./web || exit 1
tail -n +2 capi.out >> cover.out
+ tail -n +2 capp.out >> cover.out
tail -n +2 cmodel.out >> cover.out
tail -n +2 cstore.out >> cover.out
tail -n +2 cutils.out >> cover.out
tail -n +2 cweb.out >> cover.out
- rm -f capi.out cmodel.out cstore.out cutils.out cweb.out
+ rm -f capi.out capp.out cmodel.out cstore.out cutils.out cweb.out
ifeq ($(BUILD_ENTERPRISE_READY),true)
@echo Running Enterprise tests
@@ -218,7 +239,7 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
tail -n +2 csaml.out >> ecover.out
tail -n +2 ccluster.out >> ecover.out
tail -n +2 cmetrics.out >> ecover.out
- tail -n +2 caccount_migration.out >> ecover.out
+ tail -n +2 caccount_migration.out >> ecover.out
rm -f cldap.out ccompliance.out cmfa.out cemoji.out csaml.out ccluster.out cmetrics.out caccount_migration.out
rm -r ldap.test
rm -r compliance.test
@@ -301,6 +322,12 @@ package: build build-client
@# Disable developer settings
sed -i'' -e 's|"ConsoleLevel": "DEBUG"|"ConsoleLevel": "INFO"|g' $(DIST_PATH)/config/config.json
+ @# Reset email sending to original configuration
+ sed -i'' -e 's|"SendEmailNotifications": true,|"SendEmailNotifications": false,|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"FeedbackEmail": "test@example.com",|"FeedbackEmail": "",|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"SMTPServer": "dockerhost",|"SMTPServer": "",|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"SMTPPort": "2500",|"SMTPPort": "",|g' $(DIST_PATH)/config/config.json
+
@# Package webapp
mkdir -p $(DIST_PATH)/webapp/dist
cp -RL $(BUILD_WEBAPP_DIR)/dist $(DIST_PATH)/webapp
@@ -394,7 +421,7 @@ else
echo stopping mattermost $$PID; \
kill $$PID; \
done
-endif
+endif
stop-client:
@echo Stopping mattermost client