[MM-32626] Disable notices for migrations test helper (#17058)

* app/server: make initial product notice fetch blocking

* disable notices on migrations_test helper
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2021-03-05 10:57:23 +03:00
коммит произвёл GitHub
родитель 4aa6c863c3
Коммит b3498a1edf
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@@ -595,7 +595,11 @@ func NewServer(options ...Option) (*Server, error) {
// if enabled - perform initial product notices fetch
if *s.Config().AnnouncementSettings.AdminNoticesEnabled || *s.Config().AnnouncementSettings.UserNoticesEnabled {
go fakeApp.UpdateProductNotices()
go func() {
if err := fakeApp.UpdateProductNotices(); err != nil {
mlog.Warn("Failied to perform initial product notices fetch", mlog.Err(err))
}
}()
}
return s, nil

Просмотреть файл

@@ -32,6 +32,11 @@ func setupTestHelper(enterprise bool) *TestHelper {
store.DropAllTables()
memoryStore := config.NewTestMemoryStore()
newConfig := memoryStore.Get().Clone()
*newConfig.AnnouncementSettings.AdminNoticesEnabled = false
*newConfig.AnnouncementSettings.UserNoticesEnabled = false
memoryStore.Set(newConfig)
var options []app.Option
options = append(options, app.ConfigStore(memoryStore))
options = append(options, app.StoreOverride(mainHelper.Store))