Commit Graph

20 Commits

Author SHA1 Message Date
Agniva De Sarker
e89b26e8f3 goimports (#16640)
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`

* added goimports lint check to .golangci.yml

* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case

* make app-layers, *-mocks and store-layers for ci check

Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-07 22:42:43 +05:30
Fedor Vitkovskiy
896c3f736d MM-23484 - add simple validation to getUserStatusesByIds (#14158)
* MM-23484 - add simple validation to GetUsersStatusesByIds

* MM-23484 - return early in validation, add extra test case

* MM-23484 - add test case for empty array

Co-authored-by: Fedor Vitkovskiy <fedorvitkovskiy@pop-os.localdomain>
2020-03-31 20:28:26 +02:00
Jesús Espino
d2848cc167 Fixing race condition on status serialization (#14147)
* More atomic serialization process for status

* Improving the granularity of tests on api4/status_test.go
2020-03-27 11:40:52 +01:00
Jesús Espino
1d1ab03c38 Passing t to all tests setup functions (#13841)
* Passing t to all tests setup functions

* Fixing build
2020-02-10 19:31:41 +01:00
Jesús Espino
a63684fcb5 Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Laura Pareja
4f8fd3e59e migrate tests from api4/status_test.go to testify (#12906) 2019-10-24 16:59:18 +02:00
Jesse Hallam
a78913178c Ensure unittest isolation (#9819)
* api4: fix TestGetUsersNotInTeam assertions

This test was relying on data from a previous test run. With the data cleared before each test, the assertions much match reality.

* *testlib: always InitSystemAdmin

Some tests implicitly relied on the basic user having system
administrator privileges because it was the first user created as such.
Eliminate `InitSystemAdmin` and explicitly create the system admin user
instead to avoid this ambiguity going forward.

* *testlib: drop all tables before each test

* api4: split up TestChannelDelete to avoid duplicate InitBasic

* api4: teardown in TestResetPassword, for when this test comes back

* invalidate cache on DropAllTables

This is necessary since the test store persists across tests.

* disable parallel tests

While tests within a package must be explicitly parallelized using `t.Parallel()`, tests across packages are run in parallel by default.  This causes problems given that the tests all currently share the same database instance.

Unfortunately, this also means that running the tests is much slower, but we can return to this later.
2018-11-20 20:16:25 -05:00
George Goldberg
fdbb6de3d5 MM-11520: Make entity ID checks consistent across api4. (#9395)
* MM-11520: Make entity ID checks consistent across api4.

* Update tests.
2018-09-14 08:21:05 -07:00
Daniel Schalla
531897b1f0 add megacheck as makefile target (#9288)
Fix code issues in channel_test.go

Fix Channel Test Issues detected by Megacheck

Fix API Emoji Test Issues detected by Megacheck

Fixed API Issues Reported by Megacheck

Fixed App issues reported by megacheck

Remaining fixes

removed test added by mistake from old HEAD

gofmt

Store Fixes

simplified returns

Fix test for multi member channel delete

revert to delete unused function
2018-09-03 14:08:40 +02:00
Joram Wilander
275731578e MM-10254 Add plugin APIs for getting/updating user statuses (#9101)
* Add plugin APIs for getting/updating user statuses

* Add and update tests

* Updates per feedback
2018-07-16 15:49:26 -04:00
Carlos Tadeu Panato Junior
62b3569025 [PLT-4341] add dnd command (#7694) 2017-10-25 11:51:13 -04:00
Chris
9bc7af0c57 Don't use global app for api / api4 tests (#7528)
* don't use global app for api / api4 tests

* put sleep back. we're gonna have to do some goroutine wrangling

* fix oauth test config assumptions

* jobs package, i'm comin' for you next

* app test fix

* try increasing sleep a little
2017-10-02 09:50:56 +01:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Christopher Speller
77709ccdda Merge release-4.2 2017-09-06 20:43:18 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
JoramWilander
d38328976e Various patches 2017-09-06 16:24:34 -04:00
Carlos Tadeu Panato Junior
da5265681d [APIV4] Implement PUT /users/{user_id}/status for apiV4 (#5928) 2017-04-03 17:40:45 +01:00
Carlos Tadeu Panato Junior
29e6db5713 Implement POST /users/status/ids for apiv4 (#5894) 2017-03-30 08:09:39 -07:00
Carlos Tadeu Panato Junior
5bf6ae04df [APIV4] GET /users/{user_id}/status - user status endpoint for apiV4 (#5824) 2017-03-24 17:23:32 +00:00