Disable morph logging during TestMain (#30948)
* rm "No TEST_DATABASE... override" log message Let's only log if this value is actually overridden. * rm "(Created|Dropped) temporary database" message * only log "Pinging SQL" on subsequent attempts * disable morph logging from TestMain * Fix style issues in store test files - Add missing parameter to migrate() function calls in tests - Remove unused log function in settings.go - Fix formatting with go fmt 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * within sqlstore, use "enable" vs "disable" for clarity * remove trailing newline from morph logs --------- Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
92db356484
Коммит
31a8047973
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/app/platform"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store/sqlstore"
|
||||
"github.com/mattermost/mattermost/server/v8/config"
|
||||
"github.com/mattermost/mattermost/server/v8/einterfaces"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
||||
@@ -33,6 +34,13 @@ func StoreOverrideWithCache(override store.Store) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func StoreOption(option sqlstore.Option) Option {
|
||||
return func(s *Server) error {
|
||||
s.platformOptions = append(s.platformOptions, platform.StoreOption(option))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Config applies the given config dsn, whether a path to config.json
|
||||
// or a database connection string. It receives as well a set of
|
||||
// custom defaults that will be applied for any unset property of the
|
||||
@@ -110,8 +118,10 @@ func SkipPostInitialization() Option {
|
||||
}
|
||||
}
|
||||
|
||||
type AppOption func(a *App)
|
||||
type AppOptionCreator func() []AppOption
|
||||
type (
|
||||
AppOption func(a *App)
|
||||
AppOptionCreator func() []AppOption
|
||||
)
|
||||
|
||||
func ServerConnector(ch *Channels) AppOption {
|
||||
return func(a *App) {
|
||||
|
||||
Ссылка в новой задаче
Block a user