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

1275 Коммитов

Автор SHA1 Сообщение Дата
Nikhil Ranjan
540cfb0239 Migrate tests from store/storetest/team_store.go to use testify (#12877)
* Migrate tests from store/storetest/team_store.go to use testify

* fix test

* fix varible declaration

* fix tests

* casting int64 to int for Equal check

* fix int64 int Equal check

* changes as per review
2019-11-07 20:01:32 +05:30
Nikhil Ranjan
ad1ab6b038 Migrate tests from "store/storetest/webhook_store.go" to use testify (#12736)
* change t.Fatal calls to use testify require

* fix already defined err

* changes as per review comments

* changes as per review

* err is not nil
2019-11-06 21:40:50 +01:00
Jesús Espino
8febdcf2b8 Removing unnecesary unnused old layered store (#12999) 2019-11-06 12:43:41 +01:00
Shobhit Gupta
a85c653f87 Migrate tests from "store/storetest/emoji_store.go" to use tes… (#12913) 2019-11-06 12:37:35 +01:00
Witold Konior
159dec03a6 [MM-19355] Migrate tests from "store/storetest/user_store.go" (#12732)
* [MM-19355] Migrate tests from "store/storetest/user_store.go" to use testify

* fix error message

* make shadow happy!

* fix type casting in equal

* use assert instead of require to soft fail for email updates
2019-11-04 08:50:17 -05:00
Gervasio Marchand
1db045bce3 MM-16822 - Implement KVSetWithOptions (#11818)
* Add SetWithOptions

* Avoid passing two structs to the functions

* Rename ExpiryInSeconds -> ExpireInSeconds

* Use t.Run for the tests

* Fix build

* Address feedback

* Update log message

* Update docs and use KVSetWithOptions in KVCompareAndSetJSON

* Improve code style

* Use struct instead of pointer to struct

* Fix minimum server versions

* Update documentation

* Address feedback

* Revert new implemention of kv helpers

* Adress feedback
2019-11-04 13:49:54 +01:00
Ben Schumacher
812c40a307 Adjust govet settings and fix issues found by it (#12947) 2019-11-04 13:47:59 +01:00
Ben Schumacher
a2adf7b3f5 Run unused against codebase (#12968)
* Remove unused methods

* Fix missed issues
2019-11-01 23:08:01 +01:00
Nikhil Ranjan
3687a0b6c1 Migrate tests from store/storetest/status_store.go to use test… (#12873) 2019-11-01 12:52:18 +01:00
catalintomai
7c658a98f0 MM-18060: Include deleted posts in compliance export. (#12957) 2019-10-31 09:31:18 -07:00
Nikhil Ranjan
a221c52acb Migrate tests from store/storetest/oauth_store.go to use testify (#12875) 2019-10-30 19:37:36 +01:00
Carlos Tadeu Panato Junior
b3c0b5dd57 remove redis (#12918) 2019-10-29 15:05:54 +00:00
Akshay Chhajed
91f944f64d Migrate tests for store/storetest/channel_store.go (#12892)
* Migrate tests for store/storetest/channel_store.go

* Corrected variable declaration

* corrected nilf to nil

* Reordered parameters to Equal and EqualValues
Corrected few tests to use Len, NotNil to improve readability

* Removed third parameter from require.Nil()

* Corrected failing tests
2019-10-29 07:43:23 -07:00
Ben Schumacher
38c0bde7f8 Run ineffassign against codebase (#12925) 2019-10-29 15:04:28 +01:00
Ben Schumacher
7a665aacdd Run gosimple against codebase (#12928) 2019-10-29 07:45:09 +01:00
Nikhil Ranjan
d7649fbf31 Migrate tests from store/storetest/terms_of_service_store.go to use testify (#12874) 2019-10-28 20:02:28 -04:00
Nikhil Ranjan
7bcb835f37 Convert store/storetest/preference_store.go t.Fatal calls into assert/require calls (#12800)
* Convert store/storetest/preference_store.go t.Fatal calls into assert/require calls

* fix test
2019-10-28 17:23:55 -04:00
Ben Schumacher
fdcda20fe4 Cleanup dead code (#12929)
* Cleanup dead code

* Remove unneeded translation string
2019-10-28 19:12: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
Hossein Ahmadian-Yazdi
b9329d1984 [MM-13704] Updated CLI "deleter user" to also permanently delete GroupMembers associated to user (#12858)
* [MM-13704] Updated CLI to set DeleteAt in groupmemebrs

* [MM-13704] Updated Mock Test

* [MM-13704] Refactored to use current pattern to write function

* [MM-13704] Small text change

* [MM-13704] updated translation

* [MM-13704] Updated params of error function

* [MM-13704] Fixed confusion between channel and group store

* [MM-13704] Addressed PR comments

* [MM-13704] Added test case

* [MM-13704] Fixed err declaration
2019-10-24 17:31:17 -04:00
Joram Wilander
9307f75fe9 Add some group plugin APIs (#12180)
* Add group store GetByUser

* Add group store GetByName

* Add group plugin APIs

* Minor naming fixes

* Add minimum version comments
2019-10-22 14:38:08 -04:00
Nikhil Ranjan
fbf4d6d139 Convert store/storetest/user_access_token_store.go t.Fatal calls into assert/require calls (#12801)
* Convert store/storetest/user_access_token_store.go t.Fatal calls into assert/require calls

* more t.Fatal Calls converted
2019-10-22 21:47:15 +08:00
Rahul Verma
c8814b4219 Converted store/storetest/bot_store.go t.Fatal calls into assert/require calls (#12838) 2019-10-22 14:22:06 +01:00
Shobhit Gupta
94db07f65f Migrate tests from "store/storetest/command_webhook_store.go" to use testify (#12773)
* Migrate tests to use testify

* Remove dangling semicolon

* Fix failing test

* Change from assert to require.Nil
2019-10-22 05:00:11 +08:00
Will Andrews
4c7220d69a changed from using t.Fatal to Require (#12774) 2019-10-21 16:27:42 +02:00
Ben Sooraj
4b127cd877 Migrate tests from "store/storetest/reaction_store.go" to use testify (#12752)
* testReactionDelete

* testReactionSave

* testReactionGetForPost

* testReactionDeleteAllWithEmojiName

* testReactionStorePermanentDeleteBatch

* testReactionBulkGetForPosts

* `assert` to follow convention with first parameter as `t`

* using semantic assertions instead

* removing unnecessary empty lines
2019-10-21 16:19:47 +02:00
Joshua Bezaleel Abednego
db97b49e7a store/storetest: migrate command_store.go to use testify (#12797)
* Modify the calls to t.Fatal to using require package

* Fixes according to suggestions
2019-10-17 10:45:40 -07:00
WonChul Heo
bbb7308124 [MM12767] - Migrate tests from "store/storetest/license_store.… (#12769) 2019-10-17 17:05:14 +02:00
aqche
54181e4015 Migrate tests from 'store/sqlstore/utils_test.go' to use testify (#12815) 2019-10-17 07:24:06 -07:00
pqzx
1ad0cb646f Migrate tests from "store/storetest/session_store.go" to use t… (#12805) 2019-10-17 14:36:17 +02:00
Eli Yukelzon
66c66eef0d MM-19371 - Reply count disappears from pinned and flagged conv… (#12753) 2019-10-17 11:10:49 +03:00
Eli Yukelzon
4225977966 MM-19154 - Fix flaky test TestGroupStore/MySQL/GetGroups/Get_g… (#12705) 2019-10-16 12:55:36 +03: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
Amine
d7d7216b0d Migrate tests from store/storetest/cluster_discovery_store.go to use testify (#12757) 2019-10-15 16:22:19 +02:00
Irzhy Ranaivoarivony
d97afa72cb MM-19352 - Migrated test in store/storetest/audit_store.go to… (#12739) 2019-10-15 09:10:40 -04:00
Nikhil Ranjan
c5dcd85bc8 Converting to structured logging the file store/sqlstore/upgrade.go (#12628)
* Converting to structured logging the file store/sqlstore/upgrade.go

* changes as per review
2019-10-14 12:55:50 +02:00
Witold Konior
38519e349f [MM-19356] Migrate tests from "store/storetest/system_store.go" (#12719)
* [MM-19356] Migrate tests from "store/storetest/system_store.go" to use testify

* retest
2019-10-11 15:45:10 +02:00
Eli Yukelzon
34b4bbcb46 MM-18623 - invalid reply-count displayed (#12364)
* fixed thread creator, fixed default behaviour of fetching posts
* handle reply-count in getPostThread code path
2019-10-10 17:14:44 +03:00
Carlos Tadeu Panato Junior
ae3f112874 upgrade db to 5.16 (#12260)
* upgrade db to 5.16

* set current schema version
2019-10-08 09:32:51 +02:00
Agniva De Sarker
20ff7032a6 Fixed some ineffective assignments (#12543) 2019-10-03 15:45:27 +03: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
Martin Kraft
d82584a783 MM-18668: Fix for scan error selecting null SchemeGuest columns. (#12370) 2019-09-26 14:11:55 -04:00
Pavel Biryukov
af3ffeed1a Fix wrong error check (#12310) 2019-09-26 13:26:48 +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
Marc Argent
d0a138a35e GH-12049 use structured logging (#12258) 2019-09-24 18:30:13 +02:00
Ben Schumacher
3323e7a619 [MM-17109] Bump model version to 5.16 (#12172)
* Bump model version to 5.16

* Make db schema version indipended of app version
2019-09-18 18:23:58 +02:00
Joram Wilander
3d4c941ba8 MM-18512 Use options struct for GetProfilesWithoutTeam and add filtering to API (#12200)
* Use options struct for GetProfilesWithoutTeam and add filtering

* Fix test
2019-09-17 20:13:17 +01:00
Eli Yukelzon
b3517eaf2f MM-17468 - Improving performance of fetching threads (#11980)
fetchThreads parameter support in the API
2019-09-17 14:37:10 +01:00
Martin Kraft
890a7c6985 MM-18522: Include edited posts in compliance export. (#12197)
* MM-18522: Export all post edits in compliance exports.

* MM-18522: Changes ordering of export query post results.
2019-09-13 18:18:06 -04:00