[MM-53026] - Disabled insights by default (#23702)

* Insights disabled by default

* fixed tests

* fixed tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Harshil Sharma
2023-06-14 19:40:12 +05:30
коммит произвёл GitHub
родитель 4021098456
Коммит 79abeb6382
9 изменённых файлов: 89 добавлений и 3 удалений

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

@@ -3033,6 +3033,10 @@ func TestGetTopThreadsForTeamSince(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.ConfigStore.SetReadOnlyFF(false)
defer th.ConfigStore.SetReadOnlyFF(true)
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
// create a public channel, a private channel
channelPublic := th.CreateChannel(th.Context, th.BasicTeam)
channelPrivate := th.CreatePrivateChannel(th.Context, th.BasicTeam)
@@ -3105,6 +3109,10 @@ func TestGetTopThreadsForUserSince(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.ConfigStore.SetReadOnlyFF(false)
defer th.ConfigStore.SetReadOnlyFF(true)
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
// create a public channel, a private channel
channelPublic := th.CreateChannel(th.Context, th.BasicTeam)
channelPrivate := th.CreatePrivateChannel(th.Context, th.BasicTeam)
@@ -3260,6 +3268,8 @@ func TestGetTopDMsForUserSince(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.ConfigStore.SetReadOnlyFF(false)
defer th.ConfigStore.SetReadOnlyFF(true)
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
// users