summaryrefslogtreecommitdiffstats
path: root/app/apptestlib.go
Commit message (Collapse)AuthorAgeFilesLines
* Move HTTPService and ConfigService into services package (#9422)Harrison Healey2018-09-261-22/+3
| | | | | | | | * Move HTTPService and ConfigService into utils package * Re-add StaticConfigService * Move config and http services into their own packages
* MM-11855 Add App.HTTPService to allow mocking of HTTP client (#9359)Harrison Healey2018-09-071-0/+30
| | | | | | * MM-11855 Add App.HTTPService to allow mocking of HTTP client * Initialize HTTPService earlier
* MM-10254 Add plugin APIs for getting/updating user statuses (#9101)Joram Wilander2018-07-161-0/+8
| | | | | | | | * Add plugin APIs for getting/updating user statuses * Add and update tests * Updates per feedback
* Merge branch 'plugins-2'JoramWilander2018-07-101-65/+15
|\
| * MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)Christopher Speller2018-06-251-65/+15
| | | | | | | | | | | | * Moving plugins to use hashicorp go-plugin. * Tweaks from feedback.
* | MM-11194: Fix channel header slash command. (#9057)George Goldberg2018-07-081-0/+18
|/
* MM-10233: Add scheme importing to bulk importer. (#8928)George Goldberg2018-06-211-0/+49
|
* MM-10757: Default roles from scheme should be keyed by name not ID. (#8894)George Goldberg2018-06-011-3/+3
| | | | | | * MM-10757: Default roles from scheme should be keyed by name not ID. * Update permissions import/export.
* MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions (#8860)Jesús Espino2018-05-291-0/+13
| | | | | | | | | | | | | | | | * MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions * MM-8853: Removing unnecesary emoji enterprise feature * Create emojis migration * Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS always to system admins * Simplifing permissions checks * Revert "Simplifing permissions checks" This reverts commit e2cafc1905fc9e20125dd9a1552d2d0c7340ae59.
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-241-11/+19
|\
| * MM-8622: Improved plugin error reporting (#8737)Jesse Hallam2018-05-231-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow `Wait()`ing on the supervisor In the event the plugin supervisor shuts down a plugin for crashing too many times, the new `Wait()` interface allows the `ActivatePlugin` to accept a callback function to trigger when `supervisor.Wait()` returns. If the supervisor shuts down normally, this callback is invoked with a nil error, otherwise any error reported by the supervisor is passed along. * improve plugin activation/deactivation logic Avoid triggering activation of previously failed-to-start plugins just becase something in the configuration changed. Now, intelligently compare the global enable bit as well as the each individual plugin's enabled bit. * expose store to manipulate PluginStatuses * expose API to fetch plugin statuses * keep track of whether or not plugin sandboxing is supported * transition plugin statuses * restore error on plugin activation if already active * don't initialize test plugins until successfully loaded * emit websocket events when plugin statuses change * skip pruning if already initialized * MM-8622: maintain plugin statuses in memory Switch away from persisting plugin statuses to the database, and maintain in memory instead. This will be followed by a cluster interface to query the in-memory status of plugin statuses from all cluster nodes. At the same time, rename `cluster_discovery_id` on the `PluginStatus` model object to `cluster_id`. * MM-8622: aggregate plugin statuses across cluster * fetch cluster plugin statuses when emitting websocket notification * address unit test fixes after rebasing * relax (poor) racey unit test re: supervisor.Wait() * make store-mocks
* | MM-10264: Adds CLI command to import and export permissions. (#8787)Martin Kraft2018-05-171-0/+34
|/ | | | | | | | | | | | | | * MM-10264: Adds CLI command to import and export permissions. * MM-10264: Changes Scheme Name to DisplayName and adds Name slug field. * MM-10264: Changes display name max size. * MM-10264: Another merge fix. * MM-10264: Changes for more Schemes methods checking for migration. * MM-10264: More updates for Schemes migration checking.
* [MM-10458] Change system response to "Could not find the channel" - bug fix ↵Carlos Tadeu Panato Junior2018-05-111-0/+23
| | | | | | | | (#8738) * [MM-10458] Change system response to "Could not find the channel" when trying to invite user to private channel you can't see * add another check to check if user have permission to add another in pvt channel
* Structured logging (#8673)Christopher Speller2018-04-271-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* MM-10007 Send an admin and regular WS events when a user is updated (#8588)Joram Wilander2018-04-201-0/+10
| | | | | | | | * Add user.DeepCopy() function * Add omit admins/non-admins to WS broadcast and use for updating users * Updates per feedback and adding unit test for ShouldSendEvent
* [MM-9904] Add /invite slash command to invite users to a channel (#8482)Carlos Tadeu Panato Junior2018-04-161-0/+14
| | | | | | * [MM-9904] Add /invite slash command to invite users to a channel * Update en.json
* Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-131-8/+16
|\
| * MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * reverse dnd and offline * Fixed app.SaveStatusAndBroadcast * Fixed incorrect merge * Fixing incorrect merge again
| * general cleanup (#8387)Chris2018-03-071-8/+0
| |
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-131-2/+3
|\|
| * Remove license globals entirely (#8229)Chris2018-02-091-2/+3
| | | | | | | | | | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
* | AllowEditPost and PostEditTimeLimit migration (#8208)Jesús Espino2018-02-091-0/+1
| | | | | | | | | | | | | | | | * AllowEditPost and PostEditTimeLimit migration * Not set EDIT_POST permission to sysadmin_role if ALLOW_EDIT_POST is configured to NEVER * Remove a bit of code duplication
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-071-1/+5
|\|
| * Abort on critical error during server startup (#8204)Pierre de La Morinerie2018-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a handful of critical errors are present in the codebase. They all occur during server startup (in `app.StartServer()`). Currently, when one of these critical error occurs, it is simpled mentionned in the logs – then the error is discarded, and the app attempts to continue the execution (and probably fails pretty quickly in a weird way). Rather than continuing operations in an unknow state, these errors should trigger a clean exit. This commit rewrites critical startup errors to be correctly propagated, logged, and then terminate the command execution. Additionnaly, it makes the server return a proper error code to the shell.
* | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-061-1/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-13: Update Permission and Role structs to new design. * XYZ-10: Role store. * XYZ-9/XYZ-44: Roles API endpoints and WebSocket message. * XYZ-8: Switch server permissions checks to store backed roles. * XYZ-58: Proper validation of roles where required. * XYZ-11/XYZ-55: Migration to store backed roles from policy config. * XYZ-37: Update unit tests to work with database roles. * XYZ-56: Remove the "guest" role. * Changes to SetDefaultRolesFromConfig. * Short-circuit the store if nothing has changed. * Address first round of review comments. * Address second round of review comments.
* Finally remove utils.Cfg (#8113)Chris2018-01-171-5/+24
| | | | | | | | * finally remove utils.Cfg * fix compile error * another test compilation fix
* Remove global config watcher (#8080)Chris2018-01-111-2/+7
| | | | | | | | | | * remove global config watcher * keep config watcher disabled for tests * compile fix * fix resource leak
* Reduce logging data races, fix MySQL test race condition (#7994)Chris2017-12-221-2/+0
| | | | | | | | * fix races * revert unintentional change * fix test as intended
* Add plugin slash command support (#7941)Chris2017-12-081-3/+70
| | | | | | | | * add plugin slash command support * remove unused string * rebase
* refactor template code (#7860)Chris2017-11-201-1/+0
|
* Refactoring cfg refs and load / save functions (#7749)Chris2017-10-311-9/+3
| | | | | | * refactoring cfg refs and load / save functions * improve error output
* Reduce utils.Cfg references (#7650)Chris2017-10-181-4/+5
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* parallel tests (#7629)Chris2017-10-161-2/+43
|
* Miscellaneous app cleanup (#7594)Chris2017-10-091-16/+13
| | | | | | | | | | | | * app cleanup * whoops, forgot a file * some minor cleanup * longer container deadline * defensive checks
* Don't use global app for api / api4 tests (#7528)Chris2017-10-021-9/+7
| | | | | | | | | | | | | | * 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
* fix plugin test (#7436)Chris2017-09-121-3/+5
| | | | | | | | | | | | * fix plugin test * ugh. global state * Fix plugin test * Fix TestDeleteChannel * Remove plugin config listener when shutting down
* Remove global app references (#7433)Chris2017-09-121-32/+26
| | | | | | | | * remove global app references * test fix * fix api4 test compilation
* Renaming repoChristopher Speller2017-09-061-2/+2
|
* app type transition (#7167)Chris2017-09-061-23/+23
|
* set to default value with config is missing (#7320)Saturnino Abril2017-08-301-2/+2
|
* PLT-5745 Cleaning up duplicate calls (#7298)Corey Hulen2017-08-281-1/+1
| | | | | | | | * PLT-5745 Cleaning up duplicate calls * Fixing missing calls * Fixing broken test
* PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-1/+1
| | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code
* PLT-6113 Added initial unit tests for cmd package (#6086)Harrison Healey2017-04-151-0/+8
| | | | | | | | * Fixed app.CreateUser not using the provided locale * Added initial unit tests for cmd package * Disabled unit tests while we move to 'go build'
* PLT-5860 Updated copyright date (#6058)Harrison Healey2017-04-121-1/+1
| | | | | | | | | | | | * PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
* PLT-6198: Use added to channel system message on default channels. (#5969)George Goldberg2017-04-041-1/+1
| | | | Use a different sytem message when a user was added to a default channel by someone else than when they joined themselves.
* PLT-5900 Removed automatic configuration of SiteURL (#5952)Harrison Healey2017-04-041-2/+2
| | | | | | | | | | | | | | | | * Revert "PLT-5765 Passed SiteURL to SendNotifications (#5705)" This reverts commit a8e68bd8905972ae59de90fa33d5b3e3c274dc47. * Removed automatic configuration of SiteURL * Reverted unintentional config changes * Updated help text * Added link to docs in Site URL warning * Fixed merge conflict
* PLT-5765 Passed SiteURL to SendNotifications (#5705)Harrison Healey2017-03-101-2/+2
|
* Add inbucket docker image to allow local and automated testing of emails (#4901)Carlos Tadeu Panato Junior2017-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * add docker container for inbucket * Add way to get the emails using inbucket and add a test for reset password * add config setting to send emails * update TestEmailTest update * add another test and fix wrong assert * update per review fix lint change senders email * Revert config.json to default values for EmailSettings section * update test * add setup to make the test run
* PLT-4938 Add app package and move logic over from api package (#4931)Joram Wilander2017-01-131-0/+191
* Add app package and move logic over from api package * Change app package functions to return errors * Move non-api tests into app package * Fix merge