Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The
presence of the suffix suggests there's a `non-X` version: but in fact
we migrated these away a long time ago, so remove the cognitive
overhead.
As an aside, this additionally helps avoid trip up LLMs that interpret
this as "something to fix".
* Removed test_update_user_auth_plugin from golangci
The test_update_user_auth_plugin has been removed from the .golangci.yml configuration file. This change simplifies the linting process by excluding unnecessary files.
* Refactored error handling in user auth tests
The error handling for the 'expectUserAuth' function within the user authentication plugin tests has been refactored. Previously, errors were not being explicitly checked after each call to this function. Now, an error check is performed after each invocation and if an error is found, it's immediately returned. This change improves the robustness of our test suite by ensuring that potential issues are caught and handled appropriately during testing.
* Refactor error handling in UpdateUserAuth
The error handling in the UpdateUserAuth function has been refactored. The variable 'err' was replaced with 'appErr' to better reflect its purpose and improve code readability.
* Updated user authentication in plugin API
The user authentication method in the plugin API has been updated. Previously, it was fetching the user based on a static configuration value. Now, it fetches the user dynamically using the provided userID. This change makes the function more flexible and adaptable to different use cases.
* Updated golangci configuration
Removed a test file from the exclusion list in the golangci.yml configuration. This will allow linting checks to be performed on this previously excluded file, improving code quality and consistency.
* Updated golangci configuration
Removed a test file from the exclusion list in the golangci configuration. This will ensure that our linting tools also cover this previously excluded test file, improving overall code quality checks.
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
If the store fails to initialize (e.g. run a migration), it would `log.Fatal` and then `os.Exit`. Unfortunately, this trips up `TestMain`, which happily keeps running tests, now guaranteed to fail.
Avoid this by instead returning an error from the store initialization, handling appropriately at the layer above.
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.
https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.
For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```