[MM-32626] Disable notices for migrations test helper (#17058)
* app/server: make initial product notice fetch blocking * disable notices on migrations_test helper
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4aa6c863c3
Коммит
b3498a1edf
@@ -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))
|
||||
|
||||
Ссылка в новой задаче
Block a user