mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
disable boards at correct place in test helpers
This commit is contained in:
@@ -52,17 +52,18 @@ func setupTestHelper(dbStore store.Store, enterprise bool, includeCacheLayer boo
|
||||
if configSet != nil {
|
||||
configSet(memoryConfig)
|
||||
}
|
||||
*memoryConfig.PluginSettings.Directory = filepath.Join(tempWorkspace, "plugins")
|
||||
*memoryConfig.PluginSettings.ClientDirectory = filepath.Join(tempWorkspace, "webapp")
|
||||
*memoryConfig.PluginSettings.AutomaticPrepackagedPlugins = false
|
||||
*memoryConfig.LogSettings.EnableSentry = false // disable error reporting during tests
|
||||
memoryStore.Set(memoryConfig)
|
||||
|
||||
// disable Boards through the feature flag
|
||||
boardsProductEnvValue := os.Getenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
os.Unsetenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
memoryConfig.FeatureFlags.BoardsProduct = false
|
||||
|
||||
*memoryConfig.PluginSettings.Directory = filepath.Join(tempWorkspace, "plugins")
|
||||
*memoryConfig.PluginSettings.ClientDirectory = filepath.Join(tempWorkspace, "webapp")
|
||||
*memoryConfig.PluginSettings.AutomaticPrepackagedPlugins = false
|
||||
*memoryConfig.LogSettings.EnableSentry = false // disable error reporting during tests
|
||||
memoryStore.Set(memoryConfig)
|
||||
|
||||
buffer := &bytes.Buffer{}
|
||||
|
||||
var options []app.Option
|
||||
|
||||
@@ -79,16 +79,17 @@ func setupTestHelper(tb testing.TB, includeCacheLayer bool) *TestHelper {
|
||||
*newConfig.AnnouncementSettings.AdminNoticesEnabled = false
|
||||
*newConfig.AnnouncementSettings.UserNoticesEnabled = false
|
||||
*newConfig.PluginSettings.AutomaticPrepackagedPlugins = false
|
||||
memoryStore.Set(newConfig)
|
||||
var options []app.Option
|
||||
options = append(options, app.ConfigStore(memoryStore))
|
||||
options = append(options, app.StoreOverride(mainHelper.Store))
|
||||
|
||||
// disable Boards through the feature flag
|
||||
boardsProductEnvValue := os.Getenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
os.Unsetenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
newConfig.FeatureFlags.BoardsProduct = false
|
||||
|
||||
memoryStore.Set(newConfig)
|
||||
var options []app.Option
|
||||
options = append(options, app.ConfigStore(memoryStore))
|
||||
options = append(options, app.StoreOverride(mainHelper.Store))
|
||||
|
||||
testLogger, _ := mlog.NewLogger()
|
||||
logCfg, _ := config.MloggerConfigFromLoggerConfig(&newConfig.LogSettings, nil, config.GetLogFileLocation)
|
||||
if errCfg := testLogger.ConfigureTargets(logCfg, nil); errCfg != nil {
|
||||
|
||||
Reference in New Issue
Block a user