summaryrefslogtreecommitdiffstats
path: root/api4/apitestlib.go
Commit message (Collapse)AuthorAgeFilesLines
* Pr 9039 (#9187)Martin Kraft2018-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-11065: Allow to search and get archived channels from the API * Fixing more tests * Add some unit tests * Add includeDeleted parameter to session permissions check function * More test fixing * Adding archive channels list in channels search * Add restriction for archived channel edition * Reverting permissions checks modification * Changed the query parameter to include_deleted * Enable search archive channels as true by default * Adding tests for verify search on deleted channels * Allowing to override archive channels during the imports * Fixed test * Search in archive channels from the API must be explicitly requested * Removing includeDeleted parameter from GetChannelByName and GetChannelByNameForTeam * Back to ViewArchivedChannels config * Fixing tests * Reverting GetChannelByName parameter * Add include deleted parameter on GetChannel functions in plugins api * Fixing tests
* MM-11160 Adding proper CORS support. (#9152)Christopher Speller2018-07-261-3/+10
| | | | | | * Adding proper CORS support. * Better CORS tests.
* MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)Christopher Speller2018-06-251-0/+20
| | | | | | * Moving plugins to use hashicorp go-plugin. * Tweaks from feedback.
* Relese5.0 merge master 20180608 (#8933)Carlos Tadeu Panato Junior2018-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing diagnostics (#8911) * Update diagnostics.go * Update diagnostics.go * Fix push notification styling backwards compatibility (#8913) * MM-10803: remove premature user sanitization on deactivation (#8926) * remove unused UpdateNonSSOUserActive * MM-10803: stop prematurely sanitizing users on deactivate This change was preceded by the removal of UpdateNonSSOUserActive to ensure there are no APIs relying on the sanitized return value. * MM-10803: test websocket events after UpdateUserActive * MM-10264: Adds system scheme to permissions import/export. (#8924) * MM-10264: Adds system scheme to permissions import/export. * MM-10264: Switches to more likely unique name. * MM-10264: Changed collision prevention string. * MM-10264: Rolls back created schemes in all error cases. * MM-10264: Test fix for more rollback cases.
* MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions (#8860)Jesús Espino2018-05-291-0/+1
| | | | | | | | | | | | | | | | * 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-171-1/+1
|\
| * MM-8708 Remove api package (#8784)Joram Wilander2018-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove api package * Remove api dependency from cmd package * Remove EnableAPIv3 setting * Update web tests * Add more websocket tests * Move some ws and oauth tests to api4 package * Move command tests into api4 package * Test fixes * Fix msg command test * Add some app file tests
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-151-0/+2
|\|
| * Move SAML endpoints out of api package (#8780)Joram Wilander2018-05-141-0/+2
| |
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-011-12/+18
|\|
| * Structured logging (#8673)Christopher Speller2018-04-271-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-8796: Full implementation of "Schemes" in Store/Model/App layers. (#8357)George Goldberg2018-04-201-11/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Scheme model and stub store. * Port ChannelStore to be Scheme aware. * Make almost all the API/APP layer work with ChannelSchemes. Only thing still hacky is UpdateChannelMemberRoles(). * Add basic SchemeStore implementation. * Migrate UpdateChannelMemberRoles properly and fix tests. * Update store tests and mocks so they work. * Include creating default roles in Scheme create store function. * Implement role deletion and start scheme deletion. * Only use non-deleted roles for authorization. * Add GetByScheme method to Team store. * Add GetChannelsByScheme. * Update store mocks. * Implement scheme deletion in the store. * Rename is valid function. * Add offset and limit to queries to fetch teams and channels by scheme. * Fix queries. * Implement scheme awareness in Team store and add a migration. * Tidy up ChannelStore mapping functions and add exhaustive unit tests. * Add all missing i18n. * Proper tests for TeamStore internal functions and fix them. * Make additional TeamMember fields nullable. * Make new ChannelMember fields nullable. * Create new nullable columns without defaults. * Make new fields in large tables nullalble. * Fix empty list of TeamMembers. * Deduplicate SQL queries. * Fix spelling. * Fix review comment. * More review fixes. * More review fixes.
* Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-231-2/+7
|\
| * Fix various segfaults when running `go test` manually (#8448)Jesse Hallam2018-03-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * failing to find i18n shouldn't segfault The server was trying to handle the fact that it couldn't find the i18n directory, by emitting a translated log message... * fix utils.FindDir The attempts to find the directory in the parent or grandparent directory don't work if the current working directory was inside `enterprise`, with `enterprise` itself being a symlink as per the usual developer setup. Recurse to the root of the filesystem, cleaning the path along the way to work around this limitation (and allow tests to be run from an arbitrarily deep nesting level.) Fix corresponding usages to employ filepath.Join. * failing to find html templates shouldn't segfault * fail fast if the test user cannot be created * rework utils.FindDir to retain backwards compatibility
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-131-27/+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-27/+0
| |
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-021-21/+28
|\|
| * Added t.Helper to CheckXStatus test functions (#8305)Harrison Healey2018-02-201-21/+28
| |
* | 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
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-071-3/+6
|\|
| * Remove fmt.Println trace on api4 tests (#8212)Jesús Espino2018-02-071-2/+1
| |
| * 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-0/+112
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * 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-12/+25
| | | | | | | | * 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
* Role refactor (#7867)Chris2017-11-211-6/+5
| | | | | | | | * role refactor * add missing file * fix web test
* more global config ref cleanup (#7802)Chris2017-11-091-13/+14
|
* PLT-7978 Add websocket event for user role update (#7745)Joram Wilander2017-10-311-3/+3
| | | | | | | | * Add websocket event for user role update * Fix tests * More test fixes
* Refactoring cfg refs and load / save functions (#7749)Chris2017-10-311-9/+5
| | | | | | * refactoring cfg refs and load / save functions * improve error output
* [PLT-7726] adjustments for the mm-server jenkinsfile (#7688)Carlos Tadeu Panato Junior2017-10-251-1/+1
|
* Reduce cfg boilerplate (#7689)Chris2017-10-231-1/+8
| | | | | | | | | | | | * reduce cfg boilerplate * fix compile error * user test fix * another test fix * simplify diagnostics / testing
* Reduce utils.Cfg references (#7650)Chris2017-10-181-8/+9
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* fix email race condition (#7656)Chris2017-10-181-1/+4
|
* PLT-7193: Regression - Custom slash commands don't work in direct or group ↵Jonathan2017-10-171-1/+5
| | | | | | | | message channels (#7635) * No longer overriding specified team id for DMs/GMs, as these types of channels don't belong to a team, and doing so breaks slash commands for them * Ensured user is on specified team in case of GM/DM, extended test suite
* parallel tests (#7629)Chris2017-10-161-3/+8
|
* Use tmpfs containers for api/api4 tests, move and speed up CLI tests (#7606)Chris2017-10-121-2/+56
| | | | | | | | | | | | * use tmpfs containers for api/api4, move and speed up cli tests * minor optimizations * add missing files, fix pre-existing race condition * add . to TestMain check * add requested log message
* Miscellaneous app cleanup (#7594)Chris2017-10-091-21/+14
| | | | | | | | | | | | * 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-34/+26
| | | | | | | | | | | | | | * 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
* remove jobs.Srv and other jobs-related globals (#7535)Chris2017-09-291-3/+2
|
* remove remaining Global() calls (outside of tests) (#7521)Chris2017-09-281-2/+2
|
* remove global refs from api/api4 (#7496)Chris2017-09-221-1/+1
|
* 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-44/+22
| | | | | | | | * remove global app references * test fix * fix api4 test compilation
* Renaming repoChristopher Speller2017-09-061-6/+6
|
* Adding jenkinsfile for new build server.Christopher Speller2017-09-061-6/+0
|
* app type transition (#7167)Chris2017-09-061-35/+39
|
* Revert "[PLT-7475] Add S3 region to system console and add S3 validation ↵Saturnino Abril2017-09-061-3/+3
| | | | | | | | (#7373)" (#7387) This reverts commit 8d680cf64ec7fb6c8b242b8048989d0f0550cb68. Move to 4.3. Will discuss more if validation is necessary.