Граф коммитов

341 Коммитов

Автор SHA1 Сообщение Дата
Claudio Costa
c0c47df3f0 Fix data race on server startup (#13006) 2019-11-08 20:37:15 +01:00
Rajat Varyani
ac8e3a853c Add gorilla/handlers dependency as it is used in enterprise version (#12991)
* Add gorilla/handlers dependency as it is used in enterprise version

* Remove unused dependencies
2019-11-04 09:48:25 -08:00
Joshua Bezaleel Abednego
63a28700f5 [MM-12623] Create CLI command "config reset" (#10296) 2019-11-01 19:29:02 +01:00
Ben Schumacher
7a665aacdd Run gosimple against codebase (#12928) 2019-10-29 07:45:09 +01:00
Ben Schumacher
71d5f7dc64 Remove unused struct fields (#12924) 2019-10-28 18:04:50 +01:00
Ben Schumacher
e61340c54e Run gofmt -s against codebase (#12943) 2019-10-28 06:08:08 -07:00
Ben Schumacher
8a72ed2833 Fix unnecessary type conversions (#12927) 2019-10-28 10:57:21 +01:00
chahat arora
cf6496bb8f Migrate tests from app/command_test.go to use testify (#12659)
* Migrate tests from app/command_test.go to use testify

* minor fix

* minor fix

* minor fix
2019-10-27 11:42:21 +01:00
Saturnino Abril
65dc760f01 add option to generate deactivated users via sampledata (#12772) 2019-10-15 21:25:31 +08:00
Raghubendra Singh
f167a39abe Update command_test.go (#12654) 2019-10-11 15:08:18 +02:00
Phillip Ahereza
d290534297 Migrate tests from "cmd/mattermost/commands/roles_test.go" to… (#12421)
* migrated tests in roles_test.go to use testify

* format file

* format file and edit some test statements

* change some require statements to assert

* remove extra t.Fatal

* test error on response

* use require.NotEmpty
2019-10-08 09:39:44 -05:00
Ogundele Olumide
f21b7618a4 MM-19015 Migrate tests from "cmd/mattermost/commands/config_te… (#12627)
- change t.fatal to require package of the testify toolkit
2019-10-08 00:09:39 -06:00
Ogundele Olumide
fa166f13bf chore: migrate test to testify (#12507)
- replace calls to t.fatal with require assertion of testify toolkit
2019-10-04 07:43:29 -07:00
Agniva De Sarker
20ff7032a6 Fixed some ineffective assignments (#12543) 2019-10-03 15:45:27 +03:00
Aliaksandr Kantsevoi
f010346945 Migrate tests from "cmd/mattermost/commands/team_test.go" to use test… (#12509)
* Migrate tests from "cmd/mattermost/commands/team_test.go" to use testify #12410

* #12410: Simplify if checks

Migrate tests from "cmd/mattermost/commands/team_test.go" to use testify #12410
2019-10-03 16:38:41 +08:00
Ogundele Olumide
714a5c3c29 chore: convert calls to t.fatal to testify (#12506)
- use require testfify assertions to replace calls to t.fatal
2019-10-03 10:09:29 +02:00
Aliaksandr Kantsevoi
80633ef475 Migrate tests from "cmd/mattermost/commands/webhook_test.go" to use t… (#12510) 2019-10-02 11:03:37 +02:00
Jesse Hallam
beef13ae46 MM-18721: disable SIGPIPE handling (#12394)
We recently added support for handling SIGPIPE cleanly, in order to safely shutdown plugins in the event that the STDOUT/STDERR had been closed unexpectedly. Unfortunately, this signal is also emitted when writing to a closed socket connection: an event that occurs frequently for a webserver. Normally, if no signal handler is registered for same, the Go subsystem distinguishes the file descriptor and ignores those from the network. But once a handler is registered, all SIGPIPEs are passed through: and sadly there is no way to distinguish the original file descriptor.

We don't strictly need the SIGPIPE handling for development any longer since `make stop-server` no longer shuts down the logrus process which explained the majority of hanging plugin processes. It remains suboptimal that a signal can terminate the server and leave plugin processes hanging, but the current symptoms are worse.
2019-09-30 15:44:56 -03:00
Jesse Hallam
993947c70a MM-18741: clarify error message (#12357)
Clarify the error message that is emitted by the server when failing to parse the configuration.

Fixes: MM-18741
2019-09-26 23:47:13 -03:00
Shota Gvinepadze
32bc585446 [MM-18121] Fix config set panic (#12083)
* Fix config set panic

* Change error message

* Add a test case

* Update error string
2019-09-20 17:48:19 +04:00
Nikhil Ranjan
3a3676eb12 Converting to structured logging the file cmd/mattermost/commands/utils.go (#12091) 2019-09-17 12:54:43 -07:00
Paulo Bittencourt
5b79fc4110 [MM-17889] Implement validation of plugin API version comments (#11941) 2019-09-17 08:03:28 +02:00
Jesús Espino
5cf578f486 Migrating to our ldap fork (#12149) 2019-09-12 21:11:05 +02:00
scott lee davis
98f7bdcb43 MM-14827 don't kill STDOUT for the server process (#10828) 2019-09-06 19:08:39 +02:00
Claudio Costa
e1eb839636 Add integrity check command to CLI (#11599)
* Add integrity command

* Add structures and implementation for basic referential integrity check

* Use a channel to receive integrity check reports as they generates

* Setup unit testing

* Add confirm prompt to integrity command and make verbose output optional

* Add more integrity checks

* Use wrapper functions to simplify behaviour and tests

* Improve extensibility of IntegrityCheckResult

* Improve CheckIntegrity tests performance

* Use a config structure for relational integrity checks

* Add more relational integrity checks

* Add more checks and do some cleanup

* Add more relational integrity checks with proper tests

* Fix tests to use sync functions

* Add more info to integrity command help

* Add more relational integrity checks

* Add more relational integrity checks

* Add missing checks

* Show more information about missing records

* Fix to use new sync function

* Change integrity check functions to accept a SqlSupplier

* Fix code duplication

* Use squirrel for query building
2019-08-30 09:44:55 -03:00
Carlos Tadeu Panato Junior
f02f83a7df update sampledata users passwords (#11769)
* update sampledata users passwords

* update makefile
2019-08-02 19:42:25 +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
Jesús Espino
e4582905ea Time Layer for measure the Store methods calls time (#11609)
* Time Layer for measure the Store methods calls time

* Fixing build

* Fixing a formating problem

* Fixing tests

* generating store mocks

* Fixing build

* Updating generated timer layer

* Updating timer layer to the last store interface

* Updating timer layer

* Generating time layer
2019-08-01 22:10:58 +02:00
Gabe Jackson
b73b6b4c36 Improve bulk export of posts (#11702)
This change modifies some of the logic for processing posts during
bulk export in order to improve performance.
2019-07-25 12:20:49 -04:00
Joshua Bezaleel Abednego
c49f755a14 Create CLI command "team modify" to modify team's privacy setting. (#10898) 2019-07-17 11:49:12 +02:00
Rajat Varyani
c1f3c83d38 Config migrate SAML keys and certificates (#11596) 2019-07-14 09:19:51 +02:00
Claudio Costa
70fd0e0d6f Fix mixup between stdout and stderr in CLI (#11529) 2019-07-10 14:36:49 +02:00
Taufiq Rahman
9ce5b28c63 [MM-16667] Migrate User.GetByUsername to Sync by default #11453 (#11520)
* Migrate User.GetByUsername to Sync by default #11453

* fix app errors #11453

* fix app errors #11453

* fix cmd error #11453

* fix shadow var #11453

* fix shadow user var #11453

* fix test error

* fix test error #11453
2019-07-10 10:46:03 +02:00
Mounica Paladugu
ff89b2c8e1 [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default (#11100)
* [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default

* Fixing comments
2019-07-09 12:21:18 -04:00
Marc Argent
e209a7acb4 GH-11466 Migrate User.UpdatePassword to Sync by default (#11495)
* GH-11466 Migrate User.UpdatePassword to Sync by default

* GH-11466 format fix
2019-07-09 04:50:01 -07:00
Jesús Espino
da6cb83f9b Allow to export global relay to zip (#11492)
* Allow to export global relay to zip

* Addressing review comments
2019-07-08 11:06:59 +02:00
Claudio Costa
c95d295dce Update CLI channel list and search commands to show if a channel is private (#11480) 2019-07-02 16:27:00 -04:00
George Goldberg
0d8377cc59 MM-16439: Print config ordered by key alphabetically for easy diff. (#11349)
* MM-16439: Print config ordered by key alphabetically for easy diff.

* Clarify comment.
2019-06-21 17:38:26 +01:00
Rodrigo Villablanca Vásquez
59e7bf1c23 Migrates Channel.GetByName to sync by default (#11187)
* Channel.GetByName and Channel.GetByNameIncludedDeleted sync by default

* Suggested changes

* Fix some vars shadowing

* Rename of vars inside goroutine

* Shadow variable corrected
2019-06-20 15:21:36 +02:00
piperRyan
2ce36c2eb1 Migrates "Channel.GetAll" to Sync by default (#11281) 2019-06-19 10:40:05 +01:00
Rodrigo Villablanca Vásquez
d1569c48d2 Migrates Channel.PermanentDeleteMembersByChannel to sync by default (#11238) 2019-06-18 09:33:42 -07:00
Jesús Espino
693017a317 Migrate Bots store to sync by default (#11182)
* Migrate Bots store to sync by default

* Fixing tests

* Fixing govet

* Fixing tests
2019-06-14 08:20:49 -07:00
Jesús Espino
76bab4f0c2 Migrating User Store VerifyEmail, GetByAuth and GetByEmail functions to sync by default (#10941) 2019-06-12 19:30:50 +02:00
Bolarinwa Balogun
88202a76d9 [MM-16159] Migrate "Team.GetByName" to Sync by default (#11107)
* [MM-16159] Migrate "Team.GetByName" to Sync by default

* Refactor to correct mistakes and remove irrelevant code
2019-06-11 09:35:17 -04:00
Jesse Hallam
719412c1a0 MM-15956: consistent params for config migrate (#11024)
This changes the syntax of the config migrate command from:

    mattermost config migrate --from <from config> --to <to config>

to:

    mattermost config migrate <from config> <to config>

making it more consistent with our other CLI commands.
2019-05-31 17:04:59 -04:00
Jesse Hallam
ca15690685 MM-15371: allow config show --json (#10918)
* MM-15371: allow config show --json

Mattermost Cloud will (temporarily?) rely on `mattermost config show` to dump the configuration for an active cluster installation. This adds support for a `--json` flag to dump the config in a format more suitable for programmatic consumption.

* indent config show --json

* ignore coverage lines too
2019-05-28 22:18:17 -05:00
Martin Kraft
b7fcddb0fc MM-15784: Prevents non-private channels from being group-constrained … (#10950)
* MM-15784: Prevents non-private channels from being group-constrained via CLI.

* MM-15786: Fixes tests.
2019-05-28 10:55:54 -04:00
Daniel Schalla
d269891476 [MM-15490] Rework default password requirements (#10844)
* Rework default password requirements

* Update API Test Lib Default User PW

* Remove unused function; Disable password reqs in dev mode

* Disable strict password requirements for unit tests

* Update unit tests
2019-05-21 11:03:36 -07:00
Martin Kraft
8d8a4d8614 MM-15485: In-channel system behaviour for at-mentions and slash commands for group-constrained channels. (#10855)
* MM-15108: Prevent non-group-members from being added to group-constrained channels.

* MM-15485: Updates ephemeral message when non-group member is invited to group-constrained channel.

* MM-15485: Prevent group-permitted members from being removed from group-constrained channels. Show custom ephemeral when attempting /kick or /remove.
2019-05-17 12:43:19 +01:00
Pradeep Murugesan
5d1ee9373f made the Restore and Delete store method to be sync (#10835) 2019-05-16 12:31:50 +02:00