Commit Graph

11609 Commits

Author SHA1 Message Date
Harrison Healey
17d9cc224a Merge branch 'master' into mark-as-unread 2019-10-03 09:20:23 -04:00
Agniva De Sarker
20ff7032a6 Fixed some ineffective assignments (#12543) 2019-10-03 15:45:27 +03:00
SezalAgrawal
eebe1fc290 [MM-19118] Migrate tests from "model/websocket_message_test.go… (#12577)
* [MM-19118] Migrate tests from model/websocket_message_test.go to use testify

* [MM-19118] Ran go fmt on websocket_message_test.go file
2019-10-03 02:48:37 -06: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
Lev
0186fdf9e7 Bumped Autolink plugin version to 1.1.1 (#12404) 2019-10-02 15:34:21 -07:00
Nilesh Kevlani
1f6cf84bb2 Replaced t.Fatal with require.Equal (#12536) 2019-10-03 00:25:36 +03:00
Jesús Espino
2f77622b89 Upgrading server package dependencies (#12559) 2019-10-02 20:13:38 +02:00
Dennis Nguyen
c19bddb51b update config/file test to use testify (#12534) 2019-10-02 19:24:10 +02:00
Christopher Poile
f9025818b6 redirect stderr to stdout (#12516) 2019-10-02 19:23:25 +02:00
Lev
053ce34605 Bumped Welcome bot plugin version to 1.1.1 (#12407) 2019-10-02 10:09:22 -07:00
Nikhil Ranjan
3e0da03310 Convert app/user_test.go t.Fatal calls into assert/require calls (#12219)
* Convert app/user_test.go t.Fatal calls into assert/require calls

* arrange expected and actual arguments as per semantics

* arrange expected and actual arguments as per go semantics

* fix for notEqual
2019-10-02 10:00:42 -07:00
Agniva De Sarker
8ab0e80b77 MM-19022: Convert config/watcher_test.go t.Fatal calls into require calls (#12524)
* Convert config/watcher_test.go t.Fatal calls into require calls

* Moved wasCalled to a public helper function

Now the testutils package has a new function WasCalled
that can be used by anywhere.
2019-10-02 18:57:43 +02:00
Dennis Nguyen
013a81a33d migrate memory_test to use testify (#12531) 2019-10-02 18:43:16 +02:00
Lev
cc82cc990e Bumped Custom Attributes plugin version to 1.0.2 (#12405) 2019-10-02 09:35:01 -07:00
Dennis Nguyen
c859807b70 update database test to use testify (#12532) 2019-10-02 08:51:13 -04: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
Lev
838f1de9e4 Bumped the Jira plugin to v2.2.0 (#12402) 2019-10-01 13:43:46 -07:00
Harrison Healey
f21db963c8 Merge branch 'master' into mark-as-unread 2019-10-01 15:03:03 -04:00
Jesús Espino
6ba961a480 Embedding avatar in guest invite emails (#12328)
* Embedding avatar in guest invite emails

* Fixing tests

* Improving mailservice tests

* Fixing shadow variables

* Fixing styles for gmail

* Keep spacing on invite messages

* Fixing spacing
2019-09-30 23:27:07 +02:00
Harrison Healey
047aa6a76e Merge branch 'master' into mark-as-unread 2019-09-30 16:39:24 -04:00
Jesús Espino
8cea561ba6 More robust team exists api endpoint (#12130)
* More robust team exists api endpoint

* Making the code more concise

* Better handling of errors on GetTeamByName
2019-09-30 21:39:21 +02:00
Jesús Espino
89b7b2d99b Adding MM_NO_DOCKER env variable to Makefile (#12384)
* Adding MM_NO_DOCKER env variable to Makefile

* Making it consisten tiwh the previous IS_CI value
2019-09-30 20:50:56 +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
841099194d MM-18636: fix wrong merge conflict (#12386)
I resolved a merge conflict incorrectly when submitting MM-18636, and
want to remove the unused code I left behind.
2019-09-30 14:23:00 -03:00
Nikhil Ranjan
e5ba0a0a18 Converting to structured logging the file app/oauth.go (#12135) 2019-09-29 12:42:53 +02:00
Scott Bishel
cee19b0332 MM-18013 Allow configuration of SAML crypto hashing algorithms (#12362)
* MM-18013 Add SAML Algorithms to config.

* set defaults to current values, add validation for settings

* update to use simplier config entry
2019-09-27 12:13:31 -06:00
Claudio Costa
de8e798052 [MM-18638] Send mlog console output to stderr (#12366)
* Send server logs to stderr

* Update comment
2019-09-27 17:40:16 +02:00
Jesse Hallam
340287890a MM-18636: limit configuration writes to 4Mb (#12266)
* MM-18636: limit configuration writes to 4Mb

By default, MySQL silently truncates writes that exceed the column type in question. Change the column type from `TEXT` to `MEDIUMTEXT` to allow writes to the `Configurations` and `ConfigurationFiles` table to exceed 65535 bytes.  This is a backwards compatible migration, but does require a rewrite of the table.

However, MySQL is further constrained by the default `max_allowed_packet` value of 4Mb, so limit writes accordingly.

Fixes: https://mattermost.atlassian.net/browse/MM-18636

* simplify unit tests

* fix import
2019-09-27 09:10:38 -03:00
Jesse Hallam
975055a7e7 MM-18894: Update production marketplace URL (#12378) 2019-09-26 23:59:44 -03:00
Jesse Hallam
74533371b2 MM-18115: fix segment v3 usage (#12317)
* diagnostics_test.go: fix spacing

* diagnostics_test.go: explicitly assert payload

This fails, since the package is currently receiving struct pointers and won't set the MessageId or Timestamp on the corresponding Message.

* MM-18115: fix segment v3 usage

In v5.14, we updated [github.com/segmentio/analytics-go](https://github.com/segmentio/analytics-go) to v3 as part of https://mattermost.atlassian.net/browse/MM-12389. As noted in the [migration guide](https://segment.com/docs/sources/server/go/#migrating-from-v2), the API subtly changed to expect a struct value and not a struct pointer:

```go
// in v2, you would call the `Track` method with a `Track` struct.
client.Track(&track)

// in v3, you would call the `Enqueue` method with a `Track` struct.
// Note that a pointer is not used here.
client.Enqueue(track)
```

Unfortunately, we kept passing a pointer, and the package didn't complain since it only required an interface -- which the pointer to these structs still implemented. Internally, it only checked for the value types, and failed to annotate our payloads with the requisite metadata. Upstream, segment.io accepted the payload, but then discarded it silently.

This has since been reported and fixed in https://github.com/segmentio/analytics-go/pull/146, but isn't yet part of a tagged release of the package.

Fix our code to pass struct values instead.

Fixes: MM-18115
2019-09-26 23:49:43 -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
Martin Kraft
d82584a783 MM-18668: Fix for scan error selecting null SchemeGuest columns. (#12370) 2019-09-26 14:11:55 -04:00
Michael Kochell
1a4d7869cb [MM-18628] Fix flaky OpenGraph test (#12365)
* use local httptest server instead of github.com

* use switch statements
2019-09-26 13:54:51 -04:00
Pavel Biryukov
af3ffeed1a Fix wrong error check (#12310) 2019-09-26 13:26:48 +02:00
Micah Thompson
effb6d8003 MM-18253 Refactor "manualtesting/manual_testing.go" to use str… (#12363) 2019-09-26 07:19:52 +02:00
Ben Schumacher
9a363f559e [MM-18625] Make config.DatabaseStore.String() more robust (#12309) 2019-09-26 07:17:39 +02:00
Harrison Healey
67f57dd3e7 Merge branch 'master' into mark-as-unread 2019-09-25 09:06:45 -04:00
Ben Schumacher
b8f0546c19 [MM-18193] Use vendor folder when compiling test plugins (#12188) 2019-09-24 23:02:59 +02:00
Christopher Speller
7966397f1f Defaulting to using go modules vendored (#12040) 2019-09-24 22:01:53 +02:00
Jesús Espino
99f13ed0e6 Use seconds instead of nanoseconds for the store time layer metrics (#12321)
* Use nanoseconds instead of seconds for the api metrics

* Using seconds instead of nanoseconds in the store layer metrics
2019-09-24 20:00:19 +02:00
Maria A Nunez
f257109953 Revert "MM-16809: Added EnsureChannel Helper (#11852)" (#12314)
This reverts commit 5aa24aedc8.
2019-09-24 13:48:33 -04:00
Carlos Tadeu Panato Junior
c3ffac4f6b bump mattermost/mattermost-build-server to use go 1.12.9 (#12239)
* bump mattermost/mattermost-build-server to use go 1.12.9
2019-09-24 19:29:57 +02:00
Ogundele Olumide
1f9d14e24c chore: refactor to use structured logging (#12256) 2019-09-24 18:30:23 +02:00
Marc Argent
d0a138a35e GH-12049 use structured logging (#12258) 2019-09-24 18:30:13 +02:00
Nikhil Ranjan
7ba491ac2d Converting to structured logging the file app/notification_pus… (#12126) 2019-09-24 17:10:47 +02:00
Nikhil Ranjan
7464449478 Convert app/config_test.go t.Fatal calls into assert/require c… (#12220) 2019-09-24 16:49:23 +02:00
Nikhil Ranjan
d130131a88 Convert app/web_hub_test.go t.Fatal calls into assert/require… (#12222) 2019-09-24 16:44:01 +02:00
Ben Schumacher
4faf8a96b9 Bump app version to 5.18 (#12259) 2019-09-24 16:37:49 +02:00
Ogundele Olumide
be340bb7c7 MM-18317 Migrate tests from import_validators_test.go to use t… (#12129) 2019-09-24 15:37:47 +02:00