* refactor GetDirectChannel and CreateDirectChannel in one function
* remove CreateDirectChannel plugin api and update GetDirectChannel and GetGroupChannel plugin api
* update tests
We have constants for (most) of the notify props keys. We should use
them consistently, instead of sometimes and other times having strings
scattered around the place.
If some, but not all, notify props are specified for a user in the bulk
import data, and that is a newly created user, we must explicitly
initialise all the other notify props to their default values to avoid
breaking client assumptions.
* api4: improved error handling
* system_store: more logs
* integrate go-junit-report into test-te/test-ee
* add CI_MINIO_HOST and CI_INBUCKET_HOST instead of CI_HOST
* comment re: minio configuration issue
* fix TestStartServerPortUnavailable to pass even when root can bind to :21
* skip TestFindManifest_FolderPermission while running as root
* Stop inserting hashed plugin keys
* Address comments
* Remove else statement
* Address comments
* Add comment
* Update as per comments
* Refactor as per comments
* Update plugin_key_value_store.go
minor comment tweaks
* fail on non StatusNotFound for original key query
* idiomatic error handling, and do not clean up if insert fails
* [MM - 12370] Add cli command "webhook delete"
* Replace spaces with tabs
* Call cli command to delete hooks in tests
* Capture webhook object from create webhook to get webhook id
* Print error message when webhook not deleted
* Remove redundant error message and if condition in webhook delete test
* Fix build
* MM-11434 Only call PreparePostForClient once when creating a post
* Have PreparePostForClient provide new metadata when a post already has it and update tests
* fix webconn close semantics
Avoid race conditions in WebConn on shutdown by closing channels to guarantee all readers are notified. Wrap this with sync.Once to avoid closing the channel more than once.
* web_hub_test.go
* webhub: fix race condition on shutdown
Ensure that if the webhub shuts down in the process of sending, the caller unblocks given that the webhub will no longer consume incoming events.
* panic if app shutdown takes >30 seconds
* simplify WebConn::Pump channel semantics too
* 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.
* guard app plugins with mutex
Shutting down the app could race with a goroutine that uses the plugins environment, since we shut down the plugins first before cleaning up goroutines.
* fix go vet issues
* Add interactive dialogs
* Fix unit test
* Updates per feedback
* Fix typo
* Updates per feedback, add icon_url and error returns
* Updates per feedback
* Update per feedback
* Remove unused error return value from PreparePostForClient
* Remove unused error return value from PreparePostListForClient
* MM-11434 Parallelize PreparePostListForClient
* MM-11434 Skip looking reactions and files on post whenever possible
* Add note about the use of deprecated fields
* [MM-11861] Design & implement a better way for plugins to update their own configuration
Added GetPluginConfig and SavePluginConfig plugin APIs.
Added test cases for testing new APIs.
* Fixed gofmt error
* Minor changes requested in PR
* Change GetTeamMembers() and GetPublicChannelsForTeam() arguments to page, perPage for plugin API
* Add test for GetPublicChannelsForTeam()
* Add test for GetTeamMembers()
* Changes as requested
* Change return from GetPublicChannelsForTeam() to []*model.Channel