Commit Graph

24 Commits

Author SHA1 Message Date
Jesse Hallam
8374b6221e unittest using externally managed database (#9400)
* MM-12083: unittest using externally managed database

* cherry-pick Makefile changes from @cpanato

* Jenkins changes (#9915)

* add docker compose

* udpate

* when using minio dont need to set the region

* update

* add wait for it script

* using old minio

* add new jenkins file

* update makefile

* add dockerfile

* rename the docker-compose proj to avoid colision (#9917)

* rename the docker-compose proj to avoid colision

* enable debug

* enable debug to double checkt the branchs and fix docker-compose name (#9919)

* add ee hash to check (#9920)

* fix name (#9921)

* update jenkins file to push from branch and prs

* if a new push comes in stop the running build

* split mysql and postgres variables

* add script to run jenkins-like env in local dev env

* update docker-compose project name to use uuid to make it more randon

* fix DCNAME definition

* update elasticsearch docker image

* revert test

* tidy up stages, and wait for mysql differently

* update docker image and add check for postgres

* checking if is ready

* update docker compose to have a wait for deps

* add readme and rename dockerfile

* fix -unittest setup

* using mm docker image

* restore parallel unit tests at the package level

Spin up a dedicated database for each package under test to avoid races in accessing the same tables.
Simplify the interface for configuring the test database to just a DSN instead of multiple exports for each field.

* try to work around root mysql access in CI

* update local-test-env.sh too

* MYSQL_ROOT_HOST: %

* fix missing quotes

* setting some memory limits for mysql

* revert memory docker compose does not support

* fix env name for postgres

* expose errors in app/export_test.go

* fix test label, better error checking on teardown

* increase query timeout for tests

* fix export_test

* update local dev script

* add configurable mysql root passwd
2018-12-10 17:58:09 +01:00
Jesse Hallam
d39d9a5caf Dockerized build updated tests (#9943)
* testlib: introduce and leverage

This doesn't yet factor out the individual test helpers: many packages
still rely on `api4` directly to do this, but now wire up the test store
setup through this package. `app` and `store`, in particular, don't use
`testlib` because of circular dependencies at the moment.

* cmd: command_test.go: use api4 testlib

* cmd: plugin_test.go: remove dependence on test-config.json

* cmd: config_test.go use configured database settings

* ensure test-(te|ee) exit with status code

* test-server: run all tests, deprecating test-te/test-ee

* cmd/mattermost/commands: fix unit tests

Instead of relying on (and modifying) a config.json found in the current path, explicitly create a temporary one from defaults for each test. This was likely the source of various bugs over time, but specifically allows us to override the SqlSettings to point at the configured test database for all tests simultaneously.

* wrap run/check into a test helper

It was insufficient to set a config for each invocation of CheckCommand or RunCommand: some tests relied on the config having changed in a subsequent assertion. Instead, create a new test helper embedding api4.TestHelper. This has the nice advantage of cleaning up all the teardown.

* additional TestConfigGet granularity

* customized config path to avoid default location

* be explicit if the storetest initialization fails

* generate safe coverprofile names in the presence of subtests

* additional TestConfigShow granularity

* fix permission_test.go typo

* fix webhook tests

* actually flag.Parse() to skip database setup on os.Execed tests

* fix recent regression in #9962, not caught by unit tests
2018-12-06 13:19:32 -05:00
Jesse Hallam
136d8ca5c4 Various unit test related improvements (#9865)
* api4: improved error handling

* system_store: more logs

* integrate go-junit-report into test-te/test-ee

* add CI_MINIO_HOST and CI_INBUCKET_HOST instead of CI_HOST

* comment re: minio configuration issue

* fix TestStartServerPortUnavailable to pass even when root can bind to :21

* skip TestFindManifest_FolderPermission while running as root
2018-11-28 09:05:39 -05:00
Carlos Tadeu Panato Junior
940d0bbbc2 add pre-package plugins to the MM package (#9114) 2018-07-16 17:02:13 +02:00
Jason Blais
5499450224 Update privacy policy for v5.1 (#9102) 2018-07-12 20:40:18 +02:00
Jesse Hallam
912b140cc5 remove redundant checks in build.mk (#9015) 2018-06-29 10:15:01 +02:00
Christopher Speller
11cbb59747 Renaming platform binary to mattermost. (#8801) 2018-05-17 12:40:40 -07:00
Christopher Speller
26b523e4a1 Revert "add individual platform packaging targets (#8366)" (#8537)
This reverts commit f0f4f68def.
2018-03-28 14:54:58 -07:00
Carlos Tadeu Panato Junior
46fea093c8 using inbucket docker image tag release-1.2.0 instead of latest (#8406) 2018-03-12 07:39:06 -04:00
Jesús Espino
b2dd00dd5b Adding enterprise commands support (#8327) 2018-03-07 20:04:18 +00:00
Chris
f0f4f68def add individual platform packaging targets (#8366) 2018-02-26 02:48:56 -05:00
Martin Kraft
e561f727c8 Updates 'make help'. (#7982)
* Updates 'make help'.

* Updates description of all.
2017-12-20 14:49:45 -05:00
Christopher Speller
bbe971cc45 Fixing credentials and typo in Jenkinsfile (#7732) 2017-10-29 23:31:40 -07:00
Carlos Tadeu Panato Junior
b4930fb8e5 [PLT-7726] adjustments for the mm-server jenkinsfile (#7688) 2017-10-25 09:41:16 -07:00
Chris
34a87fa8f4 use webapp build from cache when possible (#7646) 2017-10-18 14:40:17 -07:00
Christopher Speller
adab1a660f Fixing some build issues 2017-09-20 13:06:22 -07:00
Christopher Speller
f9664a1e8a Adjustments to Jenkinsfile 2017-09-07 00:19:48 -07:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Christopher Speller
7bc8e9a08d Adding jenkinsfile for new build server. 2017-09-06 23:11:58 -07:00
Harrison Healey
24667e3e54 Fixed copyright dates (#6109) 2017-04-13 15:02:18 -04:00
it33
57f25fa59c Correcting doc on email address (#4013) 2016-09-12 14:21:32 -07:00
David Lu
51501f920c PLT-3753 Added Segment analytics (#3972) 2016-09-06 19:51:27 -03:00
it33
00e12f25c6 Removing out-of-date trademark protection 2016-08-27 07:43:42 -07:00
it33
0862a5fa7e Create MIT-COMPILED-LICENSE.md 2015-09-30 04:12:00 -07:00