Commit Graph

155 Commits

Author SHA1 Message Date
Agniva De Sarker
c82c37a36e MM-28067: Optimize app server startup in tests (#16263)
* MM-28067: Optimize app server startup in tests

For every test, we would wipe out the database and then start
the server again. This would run through all the migrations
and create new rows in Systems and Roles table every time.
As a result, this was consuming a lot of setup time for every test.

We optimize this by preloading the DB with dummy data in the roles
and systems table so that the server code just skips over those migrations.
This is completely forward compatible and adding new migrations does not
need to generate the sql files again. Only in case of schema changes to the
roles or systems table, this would need to be done.

It is unlikely the Systems table schema will get changed. The Roles table
might change in future but it's a comparatively rare event. Given the reduction
in CI runtime we are seeing, it's a worthy optimization.

We also apply some more optimizations:
- Coalesce multiple UpdateConfig calls into a single one. Each UpdateConfig call
has to do a json marshal which would take precious CPU cycles. It's much more
efficient to do everything in a single call.
- Remove unnecessary debug.FreeOSMemory in reload config. This was an artifact
from old days and is no longer required.

Numbers:
Results show a full **2 minutes** shaved off the test runtime. Earlier, tests
would take around 16 minutes. Now they take 14 minutes.

```release-note
NONE
```

* fix app package
2020-11-16 13:55:32 +01:00
Agniva De Sarker
325bff1176 MM-30041: Return correct error message for user save (#16117)
* MM-30041: Return correct error message for user save

We were collapsing all types of user conflict into a single
error message. Fixed it by inspecting the field of the invalidError type
and returning the correct message.

https://mattermost.atlassian.net/browse/MM-30041

```release-note
NONE
```

* Fix test errors

* Fix wrong message in test when comparing error messages

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
2020-10-30 11:14:06 +05:30
Christopher Speller
1aadd36644 MM-28859 Add feature flag managment system using split.io and remove viper. (#15954)
* Add feature flag managment system using split.io and remove viper.

* Fixing tests.

* Attempt to fix postgres tests.

* Fix watch filepath for advanced logging.

* Review fixes.

* Some error wrapping.

* Remove unessisary store interface.

* Desanitize SplitKey

* Simplify.

* Review feedback.

* Rename split mlog adatper to split logger.

* fsInner

* Style.

* Restore oldcfg test.

* Downgrading non-actionable feature flag errors to warnings.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-29 15:54:39 -07:00
Eli Yukelzon
4e9ddd4686 MM-27918 In-Product notices support (#15316) 2020-09-21 10:28:46 +03:00
Ibrahim Serdar Acikgoz
efa071d978 [MM-27967] api4/config_test: fix flaky test if siteurl is already set (#15403)
* api4/config_test: fix flaky test if siteurl is already set

* api4/apitelib enforce siteurl not set
2020-09-08 12:44:18 +03:00
Claudio Costa
c89c56ab2e [MM-27328] Upgrade minio-go to v7 (#15177)
* Upgrade minio-go to v7

* Update to v7.0.3

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-08-12 19:53:47 +02:00
Agniva De Sarker
4a2715974d MM-27149: optimize initBasic (#15063)
* MM-27149: optimize initBasic

Mostly, all tests just needed the user initialization part and not
the channel and group creation. So we move the user initialization inside
the Setup call. This avoids unnecessary DB calls which take around 250-300ms
on average.

And we make the login requests concurrently to shave off a few more ms.
According to my tests, the 2 login calls take 140 ms on average, which
shaves off 70ms.

So approximately, we shave off 350ms per test. And there are 114 occurences
of these. So around 39 seconds.

* make initlogin only for Setup/SetupEnterprise

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-22 13:50:33 +05:30
Siyuan Liu
c7f7bef9ec move cache2 package to cache (#14921)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-18 13:31:06 +05:30
Siyuan Liu
aaea36a24d MM-25115 - make cacheProvider2 accessible to localcachelayer (#14691)
* make cacheProvider2 accessible to localcachelayer

* migrate localcachelayer

* revert test.sh

* workaround gob deserialization issue

* fix web_test.go

* merge conflicts

* resolve merge conflicts

* revert back test workaround

* fix the wrong merge
2020-06-25 17:08:53 +05:30
Jesús Espino
f5eab1271b Removing all FakeApp usages (#14174)
* Removing some other fake apps

* More FakeApp removed

* Removing entirely FakeApp

* Fixing some tests

* Fixing get Cluster id from get plugin status

* Fixing failing tests

* Fixing tests

* Fixing test initialization for web

* Fixing InitServer for server tests

* Fixing InitServer for server tests

* Reverting go.sum and go.mod

* Removing unneded HTMLTemplates function in App layer

* Moving back some functions to its old place to easy the review

* Moving back some functions to its old place to easy the review

* Using the last struct2interface version

* Generating store layers

* Fixing merge problems

* Addressing PR comments

* Small fix

* Fixing app tests build

* Fixing tests

* fixing tests

* Fix tests

* Fixing tests

* Fixing tests

* Fixing tests

* Moving license to server struct

* Adding some fixes to the test compilation

* Fixing cluster and some jobs initialization

* Fixing some license tests compilation problems

* Fixing recursive cache invalidation

* Regenerating app layers

* Fix test compilation

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-12 13:43:50 +02:00
Scott Bishel
ebece6c23a MM-25014 - Default Group Name to null, until AllowGroupReference is set (#14651)
* make Group.Name a pointer to allow null

* fix unit tests

* fix build error

* fix unit test

* ensure Name field not nil

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-05-26 19:21:29 -06:00
Arianna Vespri
2135096d88 Convert bool string comparisons to strconv.ParseBool for REST parameters (#13650)
* Convert bool string comparisons to strconv.ParseBool for REST parameters

* Log failed bool conversions

* Rename errors, changed log levels

* drop strconv.ParseBool error handling

If the query string parameter is omitted, strconv.ParseBool returns an error for the empty strings, which spams the logs. Instead, just assume the default semantics of a `false` return value if an error occurs.

* allow randomized Client4 booleans

It's hard to test api4's handling of the various boolean input values
accepted. Extend Client4 with support for overriding how it builds those
strings, and pick a random value on test startup.

* gofmt -s

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-05-24 05:01:31 +08:00
Miguel de la Cruz
0d89ff5d0e Mm 23710 mmctl local mode (#14561)
* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* [MM-24401] Base approach for Local Mode (#14333)

* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* Mark the request as errored if it's local and the origin is remote

* Set the socket permissions to read/write when initialising

* Fix linter

* Replace RemoteAddr check to ditch connections with the IP:PORT shape

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Fix translations order

* [MM-24832] Migrate plugin endpoints to local mode (#14543)

* [MM-24832] Migrate plugin endpoints to local mode

* Fix client reference in helper

* [MM-24776] Migrate config endpoints to local mode (#14544)

* [MM-24776] Migrate get config endpoint to local mode

* [MM-24777] Migrate update config endpoint to local mode

* Fix update config to bypass RestrictSystemAdmin flag

* Add patchConfig endpoint

* MM-24774/MM-24755: local mode for addLicense and removeLicense (#14491)

Automatic Merge

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
2020-05-19 18:20:41 +02:00
Miguel de la Cruz
4fe25b1cdd [MM-21551] Add search tests structure to test the search engines (#14031)
* WIP

* Adding bleve to go modules

* WIP

* Adding missing files from searchengine implementation

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* User and channel indexing and searches implemented

* Make bleve tests run with in-memory indexes

* Implement post index and deletion tests

* Initial commits for the search layer

* Removing unnecesary indexing

* WIP

* WIP

* More fixes for tests

* Adding the search layer

* Finishing the migration of searchers to the layer

* Removing unnecesary code

* Allowing multiple engines active at the same time

* WIP

* Add simple post search

* Print information when using bleve

* Adding some debugging to understand better how the searches are working

* Making more dynamic config of search engines

* Add post search basics

* Adding the Purge API endpoint

* Fixing bleve config updates

* Adding missed file

* Regenerating search engine mocks

* Adding missed v5 to modules imports

* fixing i18n

* Fixing some test around search engine

* Removing all bleve traces

* Cleaning up the vendors directory and go.mod/go.sum files

* Regenerating timer layer

* Adding properly the license

* Fixing govet shadow error

* Fixing some tests

* Fixing TestSearchPostsFromUser

* Fixing another test

* Fixing more tests

* Fixing more tests

* Removing SearchEngine redundant text from searchengine module code

* Fixing some reindexing problems in members updates

* Fixing tests

* Addressing PR comments

* Reverting go.mod and go.sum

* Addressing PR comments

* Fixing tests compilation

* Fixing govet

* Adding search engine stop method

* Being more explicit on where we use includeDeleted

* Adding GetSqlSupplier test helper method

* Mocking elasticsearch start function

* Fixing tests

* Search tests

* Fix tests

* Fix mod

* Fixing searchEngine for test helpers with store mocks

* Remove loglines

* Fix i18n strings

* Migrate search posts tests

* Fix linter

* Do not run search tests if -short flag is enabled

* Migrate back store tests that didn't belong to the searchlayer

* Fix scopelint issues

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-03-30 19:17:40 +02:00
Agniva De Sarker
42081a1441 Remove unncessary recover() calls (#14066)
* Remove unncessary recover() calls

A recover which is not called inside a defer will always return nil.
So there's no use of calling it.

And even if we did call it inside a defer, recovering and immediately
panicking does not make sense either. So we just remove it.

* Fixed another instance
2020-03-17 11:04:39 +00:00
Jesús Espino
7c3e651a7b Not skiping tests on commands, and removing unnecesary main_test.go files (#14032) 2020-03-11 16:25:45 +01:00
Farhan Munshi
79c786bc0c [MM-22206] Add PATCH channel moderations (PUT /moderations/patch) (#13845)
* MM-22205 Add get channel moderations endpoint

* MM-22206 Add patch channel moderations endpoint

Add api tests for patch channel moderations

* MM-22205 Ensure ordered permissions returned and create struct ChannelModeratedRoles

* MM-22206 Use structs instead of map

* MM-22206 Add test cases for GetChannelModeratedPermissions

* MM-22206 Add tests for ChannelModeratedPermissionsChangedByPatch

* MM-22206 Use NewBool instead of defining booleans

* MM-22206 Tie Channel Mentions to Create Posts when building Channel Moderations

* Revert "MM-22206 Tie Channel Mentions to Create Posts when building Channel Moderations"

This reverts commit a0bfc95f17.

* MM-22206 Review changes

Modify GetSchemeRolesForChannel to return named variables
Change calls to SessionHasPermissionToChannel to SessionHasPermissionTo
Add a CreateChannelScheme method
Add a DeleteChannelScheme method
Move GetChannelModeratedPermissions to Role model

* Fix lint

* Add ChannelModeration methods to App interface

* MM-22206 Rename method to GetTeamSchemeChannelRoles

* MM-22206 Check CHANNEL_MODERATED_PERMISSIONS_MAP for existing permission before iterating through it

* Modify wording to higherScoped to match #13813

* MM-22206 Delete channel scheme between tests

* MM-22206 Fix tests

* Actually patch role

* MM-22206 Shadow declaration of err
2020-03-05 10:04:34 -05:00
Mario de Frutos Dieguez
b162cf92cd MM-21976: Include cache layer to be tested (#13749) 2020-03-04 14:18:03 +01:00
Patryk Pomykalski
662eef6881 Cache test users to speed up testing (#13741)
* Cache test users to speed up testing

Users were recreated for many tests and hashing passwords takes a lot of
time. Testing /api4 takes around 120s less and /app 60s less.

* fix build

* simplifying a bit the approach

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-03-03 14:19:54 +01:00
Jesús Espino
7035e09fe9 Adding changes to separate unit tests and integration tests (#13670)
* Introducing unit (not integration) tests for the app layer

* Initial support for unit tests at the API

* Adding unit tests support to the store layer

* Add unit tests support in commands

* Adding last tests needed for run unit tests properly

* Fixing govet

* Removing some duplication

* Fixing tests

* Fixing tests

* Not compiling test helpers with the main module for api

* Revert "Not compiling test helpers with the main module for api"

This reverts commit 36a199bbe0.

* Fixing tests

* Fixing unit tests

* More consistency between api4/apiteslib.go and app/helper_test.go

* Renaming things to make more obvious the new Setup functions purpose

* Reverting change in go.sum

* Start with empty mock for app layer

* Start with empty mock for api layer

* Start with empty mock for web layer

* Renaming SetupWithStoreMockConfig to SetupConfigWithStoreMock

* Fixing tests on web package

* Removing unnecesary function
2020-03-02 08:13:39 -08:00
Miguel de la Cruz
84f45634a8 Remove remaining t.Fatal from the codebase (#13876)
* Remove remaining t.Fatal from the codebase

* Fix job_store test

* Address review comments

* Remove comments
2020-02-13 17:53:23 +01:00
Eli Yukelzon
17523fa5d9 MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
Jesús Espino
1d1ab03c38 Passing t to all tests setup functions (#13841)
* Passing t to all tests setup functions

* Fixing build
2020-02-10 19:31:41 +01:00
Farhan Munshi
fa769e46d7 [MM-21793] Allow bots to be added to group synced channels and teams (#13672)
* MM-21793: Allow bots to be removed and added from group synced teams and channels

* MM-21793: Add tests for adding and removing a team and channel members

* MM-21793 Add punctuation to comments and remove unnecessary variable
2020-01-29 11:01:06 -05:00
Maria A Nunez
87eb7697f9 MM-19606- Rework Prepackaged Plugins (#13449)
* MM-19609 - Add new prepackage configuration settings (#13062)

* Add signatures to the prepackaged plugins (#13138)

* MM-19612 - Support querying local plugin marketplace when upst… (#13250)

* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled

* Update translations file

* Fixed comment

* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins

* Fixed unit tests

* Tests cleanup code

* Removed unused error message

* Updated tests

* MM-19614- Updated Marketplace Service error id (#13388)

* [MM-19610] Consume prepackaged plugins (#13005)

* consume prepackaged plugins into memory

* missing i18n

* remove spurious .gitignore changes

* return on failure to install prepackged plugins

* cleanup

* s/plugins/availablePlugins

* whitespace

* don't return extractDir when not needed

* s/plug/plugin

* error on icon, cleanup

* update armored version of testplugin signature

* honour AutomaticPrepackagedPlugins

* document getPrepackagedPlugin

* MM-19613 - Include prepackaged plugins in marketplace results (#13433)

* Added prepackaged plugins to marketplace results

* PR Feedback

* PR Feedback

* Update error where definition

* Removing unnecessary var declaration

* Updated comments

* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438)

* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint

* Call updateConfig before calling NewServer in TestHelper

* Added translations

* PR feedback

* Translations

* Feedback

* s/helpers.go/download.go

* Converging env.PrepackagedPlugins

* Initial PR feedback

* Ordered imports properly

* Updated DownloadURL to return slice of bytes

* Fixed method typo

* Fixed logging

* Added read lock for prepackaged plugins list

* PR Feedback

* Added condition to only install prepackaged plugin if it was previously enabled

* Linting

* Updated to check plugin state in config

* Closing filereader

* Only add local label if remote marketplace is enabled

* Updated local tag description

* Fixed tests

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-01-15 13:38:55 -05:00
Claudio Costa
acb19f640b [MM-21115] Add permissions check on user_typing event (#13373)
* Add permissions check on user_typing event

* Fix test
2019-12-11 20:18:36 +01: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
Claudio Costa
eeec08c071 [MM-19979] Stop sending new_user websocket event to guests (#13191)
* Stop sending new_user websocket event to guests

* Remove debug msg

* Revert go.mod/go.sum

* Fix linting issues
2019-11-28 14:24:04 +00: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
Doug Lauder
5abbe50258 MM-8607 Add ability to turn off non-critical services when under load (#13212)
* MM-8607: add ability to turn off non-critical services under load

* server busy invalid param unit tests

* MM-8607: rename server busy endpoints

* MM-8607: handle case where App not initialized

* MM-8607: additional unit test cases per feedback.

* MM-8607: use decorator to check isbusy when adding endpoint route

* MM-8607: rename endpoints, use struct for json

* Update api4/system.go

Fix misspelled log output

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>

* MM-8607: fix i18n order; max seconds for server busy expiry
2019-11-27 20:41:09 -05:00
Shobhit Gupta
111d076a86 Migrate tests from "api4/team_test.go" to use testify (#12902) 2019-11-12 12:43:10 +01:00
Agus Mistiawan
3701a393e5 Migrate tests from "api4/apitestlib.go" to use testify (#12817)
* migrate tests to use testify

* check resp error

* require empty auth

* fix based on comment

* change to require

* change all assert to require

* remove line
2019-10-27 12:54:19 +01:00
Maurício Linhares
23aa193f28 Changes tests to use testify.require at api4/file_test.go fixe… (#12814) 2019-10-23 14:45:15 +02:00
Carlos Tadeu Panato Junior
c7b583ccdd use mkdirall instead of mkdir (#12032)
* use mkdirall instead of mkdir

* revert

* create the folder here
2019-09-18 18:39:01 +02:00
Claudio Costa
d2c3933c8e [MM-18033] Upgrade minio-go dependency (#12046)
* Upgrade minio-go dependency

* Update go.mod and go.sum
2019-09-10 09:43:51 +02:00
Joram Wilander
404c49f62f MM-16725 Respect env var overrides when setting config (#11821)
* Respect env var overrides when setting config

* Use strings.NewReader
2019-08-09 11:33:59 -04:00
scott lee davis
2fa63b10ec MM 7971 dockerhost -> localhost && docker -> docker-compose (#10872)
* replace dockerhost with localhost

* remove uneeded setup-max build step (no more dockerhost)

* changes as recommended by @cpanato

* make clean-docker with docker-compose

* added ports to docker-compose.yml (needed for osx).   ignore error for ldapadd (when already exists)

* add clean-old-docker to legacy.mk

* docker-compose stop instead of down for `make stop-docker`
2019-08-02 11:53:00 -03:00
Ali Farooq
f6480d1ac6 MM-16935 - Flaky test: Elastic Search IndexChannel Error (#11709) 2019-07-26 18:53:12 -04:00
Nafis Faysal
ac4019afe5 [MM-11157] Migrate "Channel.UpdateMember" to Sync by default (#11328)
* Migrate Channel.UpdateMember to Sync by default

* Migrate Channel.UpdateMember to Sync by default

* generate store-mocks

* fix signature mismatch error

* fix shadow err
2019-06-28 14:41:50 +02:00
Rodrigo Villablanca Vásquez
0f0ebbd9d1 Migrate Team.UpdateMember to Sync by default (#11140)
* Team.UpdateMember is sync by default

* Fix go vet: declaration of err shadows declaration at line 261

* Fix shadowing variables

* fix undefined err

* fix shadowing variables
2019-06-14 20:32:24 +02:00
Rodrigo Villablanca Vásquez
8c56a5f202 Migrate Team.GetMember to Sync by default (#11141)
* Team.GetMember to Sync

* fix govet:  declaration of err shadows declaration at line 250

* Requested change

* Requested change
2019-06-14 16:28:21 +02:00
Jesper Hansen
570e6f1a74 [MM-15841] Store: Migrate "Post.Save" to Sync by default (#11045)
* MM-15841: migrate post save to sync by default #10987

* MM-15841: remove variable shadowing #10987

* MM-15841: log error on post save #10987

* MM-15841: nil check post save errors #10987

* MM-15841: update error message on post save #10987

* MM-15841: add nil check on post save in user store test #10987
2019-06-14 12:02:33 +02:00
Jesús Espino
76bab4f0c2 Migrating User Store VerifyEmail, GetByAuth and GetByEmail functions to sync by default (#10941) 2019-06-12 19:30:50 +02:00
Daniel Schalla
d269891476 [MM-15490] Rework default password requirements (#10844)
* Rework default password requirements

* Update API Test Lib Default User PW

* Remove unused function; Disable password reqs in dev mode

* Disable strict password requirements for unit tests

* Update unit tests
2019-05-21 11:03:36 -07:00
Jesús Espino
584ec68755 MM-15021: Adding new builtin system schema for Guests (#10601)
* MM-15021: Adding new builtin system schema for Guests

* Fixing tests

* Setting properly the permissions

* Adding guests to sampledata

* Restrict more roles updates in the app layer for guests

* Adding comment to explain that permissions migration must go at the end

* Setting the default guest role for custom scheme during migration

* Fixing import and export

* Creating scheme guest roles on migration

* Fixing tests

* Fixing tests

* Fixing tests
2019-04-30 20:36:21 +02:00
Jesús Espino
12c50eb830 Initial migration of the store to be sync (#10592)
* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
2019-04-15 22:53:52 +02:00
Martin Kraft
7bde0378cd MM-14753: Verifies that user can join teams and channels in spite of group constraints. (#10529)
* MM-147753: Verifies that users are allowed to be members of a team or a channel, based on group constraints, prior to allowing the API to add them.

* MM-14753: Allow methods to return meaningful results for deleted teams or channels.

* MM-14753: Renames methods to differentiate from permissions and other team and channel restrictions.

* MM-14753: Only check if users are team/channel members if team/channel is group constrained.

* MM-14753: Updates test function names.

* MM-14753: Changes a few method signatures.

* MM-14753: Small refactor and adds missing returns.

* MM-14753: Changes method names from Get* to Filter* name prefixes.

* MM-14753: Renames error variables.

* MM-14753: Updates method names for consistency with join table names.

* MM-14753: Adds case for non AppError return.

* Update i18n/en.json
2019-04-09 07:09:57 -04:00
Jesse Hallam
1e462da2d4 MM-14143 config cleanup final (#10374)
* TestGetLicenseFileFromDisk: avoid using fileutils.FindConfigFile

* config: abstract config-related file access, extend memory store

* simplify config validate to avoid file knowledge

* fix relative file tests

* cluster: fix ConfigChanged event

The old and new configurations were swapped when notifying the enterprise code of configuration changes, creating needless instability in propagating config updates across a cluster.

* config/database: ignore duplicates

* test cleanup

* remove unnecessary Save() in test
2019-03-06 15:06:45 -05:00
Daniel Schalla
f046163a12 [MM-13840] Change eMail as a post-verification action (#10253)
* Change eMail as a post-verification action

* Fix broken test

* comment for special behavior, tests

* govet

* Check for already existent eMails when require email verification is turned on before accepting update
2019-02-20 15:50:52 +01:00
Jesse Hallam
9bf5687311 MM-11262: database config store (#10281)
* vendor github.com/jmoiron/sqlx

* MM-11262: introduce a database store

* revert unnecessary fmt.Errorf

* simplify unit test helper methods

* remote TODO re: retry

* relocate initializeConfigurationsTable for clarity

* factor out a commonStore

* acquire database config lock on close for safety

* add missing header

* fix lock comment
2019-02-15 10:05:29 -04:00