Commit graph

49 commits

Author SHA1 Message Date
Jason Deland
953899ad95 Updating the mmctl process to set the value once and than use it. Also added the basic auth code from agniva 2020-09-02 18:32:10 -04:00
Jason Deland
cf3cfd2f5e Removing extra latest url code block 2020-09-02 14:52:55 -04:00
Jason Deland
111927b044 Including basic auth changes of for getting mmctl 2020-09-02 14:51:51 -04:00
Jason Paul Deland
907bc2906a
Update the get release script for mmctl to get the latest release even if its a pre-release for master builds (#15378)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-02 13:48:28 -04:00
Jason Paul Deland
0da164f70e
Update mmtcl download to account for Drat releases (#14363) 2020-08-31 13:13:51 -04:00
Ibrahim Serdar Acikgoz
eaabf96b1b
[MM-28080] scripts/test: do not remove existing data directory (#15347)
* scripts/test: do not remove existing data directory

* Update scripts/test.sh

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-08-27 14:00:47 +03:00
Agniva De Sarker
e1ca3e348f
MM-27512: Use an authenticated user to bump up request rate limit (#15251)
* MM-27512: Use an authenticated user to bump up request rate limit

An unauthenticated user can only make 60 requests per hour which means 1
request every minute. This can lead to frequent rate limit errors while
getting the latest release.

We change that to use an authenticated user which is already available
in the CI. This moves us to make 5000 requests per hour.

We also add additional logging in the Makefile targets in case
the command fails again so that it's clear what has happened, and not return
cryptic 404 errors again.

Ideally, we should be able to inspect the output of the curl command, but since
the output value of the entire bash script is fed into the variable, it is a bit
difficult to print debug output.

If this still gives error, then we need to either use a cached artifact somehow
or add additional logging and add a retry logic on top of it.

* fix mistake
2020-08-18 19:42:12 +05:30
Ashish Bhate
7e3d76b9a2
[MM-26886]: check enterprise prereqs before running tests (#15083) 2020-07-22 16:59:12 +05:30
Doug Lauder
b317ee5cf2
MM-25394 session expired push notifications (#14732)
* new job type created that checks for expired mobile sessions and pushes notifications.

* only send session expired notifications if ExtendSessionLengthWithActivity is enabled.

* includes schema change:  field added to Sessions table
2020-06-17 14:47:54 -04:00
Juho Nurminen
37f43a7094
Move Dependency-Check configs to a separate repo (#14497) 2020-05-07 12:05:49 +02:00
Juho Nurminen
cf3ba6661d
Fix dependency alerting (#14457)
Automatic Merge
2020-05-04 04:21:47 -07:00
Agniva De Sarker
ac4153df03
Bump minimum Go version required (#14250)
After the auto-vendoring change, minimum Go version
required is 1.14.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-04-08 14:28:55 +05:30
Juho Nurminen
d1ab17fa7c
Update depcheck alert messages (#14163)
Automatic Merge
2020-03-26 07:13:25 -07:00
Juho Nurminen
28a7993ac9
MM-22889: Integrate Dependency-Check to CircleCI (#14023)
* Add basic dependency-check job

* Include summary in alert

* Link to NVD

* Move the alert script to a separate file
2020-03-24 09:19:41 +02:00
Patryk Pomykalski
9369d65441
Optimize reactions table (#13406)
* Optimize reactions table

Change reactions primary key to (PostId, UserId, EmojiName) so fetching
reactions for post will use primary key lookup instead of table scan.

* fix db version

* review fixes

* update database schema in scripts/
2020-03-17 10:53:31 +01:00
Elisabeth Kulzer
8f0bedf9c9
Fix triggering the release logic on a branch with release in its name. (#13915)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-02 22:01:45 +01:00
Jason Paul Deland
28ef877876
(IS-302) Streamling process to download pre-built binaries (#13830)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir

* Streamlined script to find the correct latest version of an externally built binary from a GitHub Release

* Updated variable names to match

* Updating vars to match

* Updating parameters to named variables for clarity

* Update scripts/get_latest_release.sh

Co-Authored-By: Elisabeth Kulzer <elikul@elikul.de>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2020-02-11 12:29:38 -05:00
Jason Paul Deland
acce0da068
Adding target to get the latest mmctl release from GitHub (#13770)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir
2020-02-03 16:58:15 -05:00
Agniva De Sarker
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Agniva De Sarker
a83df931b9 Replace pipe with redirection to a subshell (#13409)
When the writing process sends an EAGAIN to the fd, tee dies.
We correct this behavior by redirecting the output to a subshell
which handles this correctly.

Relevant link here: https://serverfault.com/questions/369757/why-is-this-tee-losing-stdout
2019-12-17 14:58:25 +01:00
Jesús Espino
f55a81163e
Adding mattermost-govet to the pipeline (#13257)
* Adding mattermost-govet to the pipeline

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Adding legacy check-licenses task to legacy.mk

* Removing unnecesary GO111MODULE=off lines

* Adding jenkins mattermost-govet installation
2019-12-10 13:10:35 +01:00
Sven Hüster
85960abb08 add group filter support to ldap-check.sh (#11935)
* add group filter support to ldap-check.sh

* Update scripts/ldap-check.sh

Co-Authored-By: George Goldberg <george@gberg.me>
2019-11-20 13:52:26 +00:00
Rodrigo Villablanca Vásquez
a39f4f1064 Change the minor version of go to 1.13 (#13015)
* Changed go minor version 12 -> 13

* REQUIREDGOVERSION set to 1.13.0
2019-11-06 07:04:50 -08:00
Jesse Hallam
5d45aa81e0
MM-16888: fix missing indexes (#12746)
* MM-16888: fix missing indexes

As part of https://mattermost.atlassian.net/browse/MM-16888, we discovered and fixed a number of column and index mismatches between the canonical (i.e. created from scratch) and migrated schemas (i.e migrated from 5.0 through 5.16).

Unfortunately, the migration to fix same was added to `UpgradeDatabaseToVersion514` but never cherry picked to the pending v5.14 release at the time. Customers who upgraded to v5.14 or v5.15 and then get this code as part of v5.16 will never run that migration. Copy it to the UpgradeDatabaseToVersion516 accordingly.

* avoid fixing ChannelMembers.SchemeGuest on MySQL

* synchronize .circleci/config.yml with scripts/mysql-migration-test.sh

* fix circleci invocation

* additional logging on diff

* update build/Jenkinsfile.pr too!
2019-10-15 15:47:09 -03:00
Christopher Speller
7966397f1f Defaulting to using go modules vendored (#12040) 2019-09-24 22:01:53 +02:00
threepwood-mm
782375f5c7 [MM-17703] Diff config files (#11898) 2019-08-29 22:44:12 +02:00
scott lee davis
2fa63b10ec MM 7971 dockerhost -> localhost && docker -> docker-compose (#10872)
* replace dockerhost with localhost

* remove uneeded setup-max build step (no more dockerhost)

* changes as recommended by @cpanato

* make clean-docker with docker-compose

* added ports to docker-compose.yml (needed for osx).   ignore error for ldapadd (when already exists)

* add clean-old-docker to legacy.mk

* docker-compose stop instead of down for `make stop-docker`
2019-08-02 11:53:00 -03:00
Harrison Healey
673ed02a0d MM-16543 Fix Elasticsearch only returning one page of results (#11528)
* MM-16543 Add mocking for einterfaces packages

* MM-16543 Fix Elasticsearch only returning one page of results

* Remove license checks for einterface mocks
2019-07-08 08:32:29 -07:00
Evan do Carmo
b3e09715df escaping file name to allow for special chars 10796 (#10824) 2019-05-15 06:59:28 +02:00
Harrison Healey
e50b642e43
MM-14030 Add format and frame count to image metadata (#10757)
* MM-14030 Add initial CountFrames

* MM-14030 Add format and frame count to image metadata

* Fix tests and stop using image dimensions from OpenGraph

* Fix copyright header

* Move license to NOTICE.txt
2019-04-30 16:45:26 -04:00
Sandeep Sukhani
a9c327c068 [MM-13341] Add an upgrade test to verify schema (#10419)
* [MM-13341] Add an upgrade test to verify schema

Upgrade test is done by following steps:
1. A mysql dump generated from v4.10.0 is imported in a database and is ran through migration code
2. Another fresh database is generated without any initial data, which gets latest schema.
3. Diff between these 2 databases is generated using mysqldiff tool from mysql utilities

For db setup, version cli command is used which takes care of migration or setup of fresh db

* Using 5.7 tag for mysql docker image which is already used for db setup

* Starting docker containers for db before running tests

* Using db from v5.0.0 for migration test

* Added migration test for psql and made some improvements in running commands in docker

* Add postgres db dump file

* Updated message

* moved dump files to scripts and using error code from diff command
2019-03-19 15:05:15 -04:00
Carlos Tadeu Panato Junior
6a3fdbd489 update go to 1.12 (#10382)
* update go to 1.12

* update per feedback

* fix test

* revert test changes

* remove zap.AddCallerSkip(1)
2019-03-01 12:55:35 -05:00
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
George Goldberg
328d9a55ee Bump prerequisite go version check to 1.11 (#9517) 2018-10-01 10:21:55 -07:00
Jesús Espino
a08df883b4 Move file backend to its own service (#9435)
* Move file backend to its own service

* Moving utils/inbucket to mailservice package
2018-09-20 10:07:03 -07:00
Christopher Speller
df6a7f8b19
MM-10249 Adding plugin ability to intercept posts before they reach the DB. (#8791)
* Adding plugin ability to intercept posts before they reach the DB.

* s/envoked/invoked/
2018-05-15 13:33:47 -07:00
Fede
2fba6fa799 Fix prerequisites checker so 1.10 > 1.9 (#8344)
* Fix prerequisites checker so 1.10 > 1.9

* Check prerequisites sorting by dot separator
2018-02-27 17:53:27 -05:00
Derrick Anderson
d45d8a16b3
prereq check (#8151) 2018-01-25 08:40:29 -05:00
Corey Hulen
df09f87def Adding a script to help with ldap config issues (#7995)
* Adding a script to help with ldap config

* Fixing help text

* Fixing typo
2018-01-02 12:11:30 -08:00
Joram Wilander
150de584c3
PLT-8131 Bundled zoom plugin (#7947)
* Bundled zoom plugin

* Update plugin to latest
2017-12-05 16:35:46 -05:00
Chris
daebd26a28
PLT-8018: Bundled jira plugin (#7920)
* bundled jira plugin

* fix generated file formatting, add prepackaged key

* whoops, uploaded wrong file

* whitelist generated files for license check

* make it work for people without go/bin in their path
2017-11-30 14:55:44 -06:00
Chris
6f6005c617 Store mocks (#7724)
* store mocks

* add example
2017-10-26 11:36:54 -05:00
Chris
5dd4466ab3 add missing license headers, test to makefile (#7711) 2017-10-25 09:33:19 -07:00
Chris
785cc06f6e Make test execution not take quadratic compilation time (#7610)
* make test execution not take quadratic compilation time

* add -p flag. we can only test one package at a time (for now)

* cd to mattermost-server for enterprise

* whoops

* let's go ahead and make the coverage profiles ready for concurrent test
2017-10-12 08:35:19 -07:00
it33
def20f7e32 Rename scripts/README_DEV.md to doc/install/dev-setup.md 2015-09-02 20:06:12 -07:00
Harrison Healey
9aebbe058e Updated developer setup instructions to include Ubuntu setup 2015-07-31 10:28:40 -04:00
it33
b31327f072 Updating README_DEV.md with corrected forum links 2015-07-13 23:40:40 -07:00
=Corey Hulen
8de8158378 Updating readme 2015-06-18 23:14:43 -08:00