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

539 Коммитов

Автор SHA1 Сообщение Дата
Harrison Healey
4a23d4b282 MM-20681 Fix custom post types not marking channel unread when using Mark as Unread (#13247)
* MM-20681 Fix custom post types not marking channel unread when using Mark as Unread

* Fix inverted if statements
2019-12-03 14:51:50 -05:00
Ben Schumacher
d0d6ce0a70 [MM-20353] Change KVSetWithOptions to accept a byte slice (#13213)
* Drop EncodeJSON from PluginKVSetOptions

* Add unit tests for KVSetWithOptions with nil values
2019-12-03 10:46:15 +01:00
Harrison Healey
a0130b86d7 MM-20649 Fix incorrect mention count when marking a DM channel as unread (#13245)
* MM-20649 Fix incorrect mention count when marking a DM channel as unread

* Satisfy govet

* Update missed test
2019-12-02 09:30:08 -05:00
Eli Yukelzon
4e5369e759 MM-19957 - Deactivating a user should increment the Daily and… (#13232)
* corrected active count function
2019-12-02 15:48:36 +02: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
larkox
d2e78e28a9 [GH-13105] Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13164)
* Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer

* Remove GetPinnedPostCountFromCache

* Rearrange test to avoid undeclared variable
2019-11-28 15:21:42 -05: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
Martin Kraft
14bcd1f0a1 MM-18357: Adds pagination to team search. (#12910)
* MM-18357: Adds pagination to team search.

* MM-18357: Adds new client method for paginated requests.

* MM-18357: Adds feedback about non-supported pagination-permissions combo.

* MM-18357: Removes unnecessary conversion.

* MM-18357: Removes paginate parameter and uses nil on page and perpage instead.
2019-11-28 08:11:02 -05:00
catalintomai
955f8c4e8e MM-19956: Add edit and delete post message export tests. (#13156)
* MM-19956: Add edit and delete post message export tests.
2019-11-27 21:05:53 -08:00
Martin Kraft
31ac88ef69 MM-20305: Adds ability to choose whether deleted teams are included in the count query. (#13181) 2019-11-27 07:50:15 -05:00
Rodrigo Villablanca Vásquez
3a8fb53f3e Migrates the lastPostsCache from PostStore into cache layer (#13141)
* Some advances

* Partial advances

* Cache moved

* Tests finished

* Removed all test for PostStore (store/sqlstore) related with Cache. This is tested in the cache layer now
2019-11-20 15:03:08 +01:00
Martin Kraft
0212845385 MM-18356: Adds ability to paginate channel search. (#12830)
* MM-18356: Adds ability to paginate channel search.

* MM-18356: Minor refactor.

* MM-18356: Adds doc.

* MM-18356: Fixes doc.

* MM-18356: Some commentary, adds the total count to non-paginated responses, and removes a stray fmt.

* MM-18356: Fixes shadowed variable.

* MM-18356: Removes paginate field and API parameter.

* MM-18356: Adds method to check if channel search is a paginated request.

* MM-18356: Vet fix.
2019-11-19 11:38:49 -05:00
Harrison Healey
de913e7537 Merge branch 'master' into mark-as-unread 2019-11-19 09:45:03 -05:00
larkox
c40f0a4aea [GH-13070] Migrate emojiIdCacheByName cache from store/sqlstore/emoji_store.go to the new store/localcachelayer (#13125)
Automatic Merge
2019-11-19 05:26:52 -05:00
Jesús Espino
7031f51b41 Deactivating and invalidating sessions of guest users on guest disable (#13007)
Automatic Merge
2019-11-15 09:43:52 -05:00
Harrison Healey
df7cbcb440 Merge branch 'master' into mark-as-unread 2019-11-12 14:20:50 -05:00
Valentijn Nieman
36f3b14420 MM-19337 Enable users to view archived channels (#12995)
* First pass at searching archived channels

* Create endpoint for archived channels

* Update test for GetPublicChannelsForTeam

* Fix unit test for archived channels

* Rename includeDeleted to onlyDeleted

* Remove new /archived endpoint in favour of existing /deleted endpoint

* Fix broken test

* Remove manage team permission from /deleted endpoint

* Fix deletedChannels test

* Test for searching archived channels

* Only return private deleted channels user was a member of

* SearchArchivedChannels also searches private channels (user is a member of)

* Remove for loop to simplify append

* Remove userId from Client4 searcArchivedChannels
2019-11-12 06:15:19 +08:00
Harrison Healey
6e6174a9ee Merge branch 'master' into mark-as-unread 2019-11-07 10:58:09 -05:00
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
Harrison Healey
47409aaa4b Merge branch 'master' into mark-as-unread 2019-11-04 15:04:28 -05: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
Nikhil Ranjan
3687a0b6c1 Migrate tests from store/storetest/status_store.go to use test… (#12873) 2019-11-01 12:52:18 +01:00
Harrison Healey
fa34be4aa0 Merge branch 'master' into mark-as-unread 2019-10-31 09:15:41 -04:00
Nikhil Ranjan
a221c52acb Migrate tests from store/storetest/oauth_store.go to use testify (#12875) 2019-10-30 19:37:36 +01: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
Harrison Healey
eb36329e8d Merge branch 'master' into mark-as-unread 2019-10-29 10:11:41 -04: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
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
Harrison Healey
9b1ba32dc6 Merge branch 'master' into mark-as-unread 2019-10-21 13:37:33 -04: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
Harrison Healey
6ee681e50b Merge branch 'master' into mark-as-unread 2019-10-18 16:07:41 -04: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
Harrison Healey
e5dbd45f94 Merge branch 'master' into mark-as-unread 2019-10-17 09:44:32 -04: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
4225977966 MM-19154 - Fix flaky test TestGroupStore/MySQL/GetGroups/Get_g… (#12705) 2019-10-16 12:55:36 +03:00
Harrison Healey
6a5b264624 Merge branch 'master' into mark-as-unread 2019-10-15 12:10:55 -04:00
Amine
d7d7216b0d Migrate tests from store/storetest/cluster_discovery_store.go to use testify (#12757) 2019-10-15 16:22:19 +02:00