* testlib: introduce and leverage
This doesn't yet factor out the individual test helpers: many packages
still rely on `api4` directly to do this, but now wire up the test store
setup through this package. `app` and `store`, in particular, don't use
`testlib` because of circular dependencies at the moment.
* cmd: command_test.go: use api4 testlib
* cmd: plugin_test.go: remove dependence on test-config.json
* cmd: config_test.go use configured database settings
* ensure test-(te|ee) exit with status code
* test-server: run all tests, deprecating test-te/test-ee
* cmd/mattermost/commands: fix unit tests
Instead of relying on (and modifying) a config.json found in the current path, explicitly create a temporary one from defaults for each test. This was likely the source of various bugs over time, but specifically allows us to override the SqlSettings to point at the configured test database for all tests simultaneously.
* wrap run/check into a test helper
It was insufficient to set a config for each invocation of CheckCommand or RunCommand: some tests relied on the config having changed in a subsequent assertion. Instead, create a new test helper embedding api4.TestHelper. This has the nice advantage of cleaning up all the teardown.
* additional TestConfigGet granularity
* customized config path to avoid default location
* be explicit if the storetest initialization fails
* generate safe coverprofile names in the presence of subtests
* additional TestConfigShow granularity
* fix permission_test.go typo
* fix webhook tests
* actually flag.Parse() to skip database setup on os.Execed tests
* fix recent regression in #9962, not caught by unit tests
Config Checks at StartUp Part1
Config Checks; Tests for TLS Server
HSTS header implementation + tests
make gofmt happy with new go version...
make gofmt happy with new go version #2...
fix logic bug
fix typo
Fix unnecessary code block
* Testing caching for emojis
* MM-10117 Add support to add/delete and activate/deactivate plugins via CLI
* Removing old work
* MM-10117 Moved files and addedd plugin test
* MM-10117 Renamed commands to enable/disable and updated add test
* MM-10117 Finished plugin test and improved error message for plugin commands
* MM-10117 Fixing plugin directories for test
* MM-10117 Renamed commands and updated commands to support multiple plugins
* MM-10117 Updating removed to deleted textclear
* MM-10117 Fixing nil pointer error for listing plugins
* MM-10117 Removing fileReader close
* MM-10117 Declaring error for GetPlugins
* MM-10117 Removing unnecessary nil check
* Implement experimental REST API endpoints for plugins
* Updates per feedback and rebase
* Update tests
* Further updates
* Update extraction of plugins
* Use OS temp dir for plugins instead of search path
* Fail extraction on paths that attempt to traverse upward
* Update pluginenv ActivePlugins()
* PLT-7356 Split emoji test 1 into smaller test files
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* PLT-7356 Split emoji test 2 into smaller test files
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* PLT-7378 Split emoji test 3 into smaller test files
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* PLT-7378 Split emoji test 4 into smaller test files
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* PLT-7356 and 7378 Create test-emoticons5.md
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* PLT-7356 and 7378 Create test-emoticons6.md
Prevent test files from splitting into multiple posts.
Reducing the number of emoji in each file (test-emoticons1.md through test-emoticons4.md) so each post is <4000 characters. Adding two new files to accommodate the emoji overflow: test-emoticons5.md and test-emoticons6.md
* Updated with new emoji set for testing
Changed test-emoticons4.md from Symbols and formatting tests to Flags, Special, and formatting tests.
* Updated with new emoji set for testing
Updated test-emoticons3.md from Places to Objects and Symbols.
* Updated with new emoji set for testing
Updated test-emoticons2.md from Objects to Food, Activity, and Travel.
* Updated with new emoji set for testing
Updated test-emoticons1.md to new emoji set, still containing the intro, People, and Nature sections.
* Refactored emoji.json to support multiple aliases and emoji categories
* Added custom category to emoji.jsx and stabilized all fields
* Removed conflicting aliases for :mattermost: and :ca:
* fixup after store changes
* Added emoji reactions
* Removed reactions for an emoji when that emoji is deleted
* Fixed incorrect test case
* Renamed ReactionList to ReactionListView
* Fixed 👍 and 👎 not showing up as possible reactions
* Removed text emoticons from emoji reaction autocomplete
* Changed emoji reactions to be sorted by the order that they were first created
* Set a maximum number of listeners for the ReactionStore
* Removed unused code from Textbox component
* Fixed reaction permissions
* Changed error code when trying to modify reactions for another user
* Fixed merge conflicts
* Properly applied theme colours to reactions
* Fixed ESLint and gofmt errors
* Fixed ReactionListContainer to properly update when its post prop changes
* Removed unnecessary escape characters from reaction regexes
* Shared reaction message pattern between CreatePost and CreateComment
* Removed an unnecessary select query when saving a reaction
* Changed reactions route to be under /reactions
* Fixed copyright dates on newly added files
* Removed debug code that prevented all unit tests from being ran
* Cleaned up unnecessary code for reactions
* Renamed ReactionStore.List to ReactionStore.GetForPost
* Slack Import unit tests (for some functions).
Covers the completely self contained functions in the Slack Importer
that are straightforward to unit test.
JSON processing functions are not yet unit tested.
* Unit tests for Slack Import JSON parsing.
This tests the 3 functions for parsing JSON, using a sample set of
Slack data for posts, channels, and users.
* PLT-3552 Partially-fixed an invalid test case
* PLT-3551 Removed an invalid test case
* PLT-3482 Added a test case for multiple lists separated by text
* PLT-3482 Updated marked to fix multiple lists separated by text
* Removed MattermostLexer since it was exactly the same as the default marked one
* Updated list autonumbering to always start numbering from the first item's number