MM-49485: Set BoardsProduct FF to on by default (#22006)

https://mattermost.atlassian.net/browse/MM-49485

```release-note
Boards will be served as an in-built product from
within Mattermost server instead of a plugin.

If you want to disable this, please set the
MM_FEATUREFLAGS_BoardsProduct env var to "false" (without
                                                  the quotes).

In this mode, the boards plugin will remain disabled.
```
Этот коммит содержится в:
Agniva De Sarker
2023-01-09 21:53:07 +05:30
коммит произвёл GitHub
родитель 27a702e29a
Коммит d27d7bc8f7
5 изменённых файлов: 9 добавлений и 8 удалений

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

@@ -808,7 +808,7 @@ func TestDiff(t *testing.T) {
Enable: !defaultConfigGen().PluginSettings.PluginStates["com.mattermost.nps"].Enable, Enable: !defaultConfigGen().PluginSettings.PluginStates["com.mattermost.nps"].Enable,
}, },
"focalboard": { "focalboard": {
Enable: true, Enable: false,
}, },
"playbooks": { "playbooks": {
Enable: true, Enable: true,
@@ -846,7 +846,7 @@ func TestDiff(t *testing.T) {
Enable: true, Enable: true,
}, },
"focalboard": { "focalboard": {
Enable: true, Enable: false,
}, },
"playbooks": { "playbooks": {
Enable: true, Enable: true,
@@ -876,7 +876,7 @@ func TestDiff(t *testing.T) {
BaseVal: defaultConfigGen().PluginSettings.PluginStates, BaseVal: defaultConfigGen().PluginSettings.PluginStates,
ActualVal: map[string]*model.PluginState{ ActualVal: map[string]*model.PluginState{
"focalboard": { "focalboard": {
Enable: true, Enable: false,
}, },
"playbooks": { "playbooks": {
Enable: true, Enable: true,

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

@@ -2867,8 +2867,8 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) {
} }
if s.PluginStates[PluginIdFocalboard] == nil { if s.PluginStates[PluginIdFocalboard] == nil {
// Enable the focalboard plugin by default // Disable the focalboard plugin by default
s.PluginStates[PluginIdFocalboard] = &PluginState{Enable: true} s.PluginStates[PluginIdFocalboard] = &PluginState{Enable: false}
} }
if s.PluginStates[PluginIdApps] == nil { if s.PluginStates[PluginIdApps] == nil {

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

@@ -387,11 +387,11 @@ func TestConfigDefaultChannelExportPluginState(t *testing.T) {
} }
func TestConfigDefaultFocalboardPluginState(t *testing.T) { func TestConfigDefaultFocalboardPluginState(t *testing.T) {
t.Run("should enable Focalboard plugin by default", func(t *testing.T) { t.Run("should not enable Focalboard plugin by default", func(t *testing.T) {
c1 := Config{} c1 := Config{}
c1.SetDefaults() c1.SetDefaults()
assert.True(t, c1.PluginSettings.PluginStates["focalboard"].Enable) assert.False(t, c1.PluginSettings.PluginStates["focalboard"].Enable)
}) })
t.Run("should not re-enable focalboard plugin after it has been disabled", func(t *testing.T) { t.Run("should not re-enable focalboard plugin after it has been disabled", func(t *testing.T) {

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

@@ -95,7 +95,7 @@ func (f *FeatureFlags) SetDefaults() {
f.InsightsEnabled = true f.InsightsEnabled = true
f.CommandPalette = false f.CommandPalette = false
f.CallsEnabled = true f.CallsEnabled = true
f.BoardsProduct = false f.BoardsProduct = true
f.SendWelcomePost = true f.SendWelcomePost = true
f.PostPriority = true f.PostPriority = true
f.PeopleProduct = false f.PeopleProduct = false

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

@@ -14,6 +14,7 @@ COVERMODE=$8
PACKAGES_COMMA=$(echo $PACKAGES | tr ' ' ',') PACKAGES_COMMA=$(echo $PACKAGES | tr ' ' ',')
export MM_SERVER_PATH=$PWD export MM_SERVER_PATH=$PWD
export MM_FEATUREFLAGS_BoardsProduct=false
echo "Packages to test: $PACKAGES" echo "Packages to test: $PACKAGES"
echo "GOFLAGS: $GOFLAGS" echo "GOFLAGS: $GOFLAGS"