mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Turn focalboard plugin on by default (#18132)
* turn focalboard plugin on by default * cleanup * update config diff tests to add new default Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -339,6 +339,9 @@ func TestDiff(t *testing.T) {
|
||||
"com.mattermost.nps": {
|
||||
Enable: !defaultConfigGen().PluginSettings.PluginStates["com.mattermost.nps"].Enable,
|
||||
},
|
||||
"focalboard": {
|
||||
Enable: true,
|
||||
},
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
@@ -368,6 +371,9 @@ func TestDiff(t *testing.T) {
|
||||
"com.mattermost.newplugin": {
|
||||
Enable: true,
|
||||
},
|
||||
"focalboard": {
|
||||
Enable: true,
|
||||
},
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
@@ -389,6 +395,9 @@ func TestDiff(t *testing.T) {
|
||||
Path: "PluginSettings.PluginStates",
|
||||
BaseVal: defaultConfigGen().PluginSettings.PluginStates,
|
||||
ActualVal: map[string]*model.PluginState{
|
||||
"focalboard": {
|
||||
Enable: true,
|
||||
},
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
|
||||
@@ -2713,6 +2713,11 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) {
|
||||
s.PluginStates["com.mattermost.plugin-channel-export"] = &PluginState{Enable: true}
|
||||
}
|
||||
|
||||
if s.PluginStates["focalboard"] == nil {
|
||||
// Enable the focalboard plugin by default
|
||||
s.PluginStates["focalboard"] = &PluginState{Enable: true}
|
||||
}
|
||||
|
||||
if s.EnableMarketplace == nil {
|
||||
s.EnableMarketplace = NewBool(PluginSettingsDefaultEnableMarketplace)
|
||||
}
|
||||
|
||||
@@ -378,6 +378,30 @@ func TestConfigDefaultChannelExportPluginState(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConfigDefaultFocalboardPluginState(t *testing.T) {
|
||||
t.Run("should enable Focalboard plugin by default", func(t *testing.T) {
|
||||
c1 := Config{}
|
||||
c1.SetDefaults()
|
||||
|
||||
assert.True(t, c1.PluginSettings.PluginStates["focalboard"].Enable)
|
||||
})
|
||||
|
||||
t.Run("should not re-enable focalboard plugin after it has been disabled", func(t *testing.T) {
|
||||
c1 := Config{
|
||||
PluginSettings: PluginSettings{
|
||||
PluginStates: map[string]*PluginState{
|
||||
"focalboard": {
|
||||
Enable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
c1.SetDefaults()
|
||||
assert.False(t, c1.PluginSettings.PluginStates["focalboard"].Enable)
|
||||
})
|
||||
}
|
||||
|
||||
func TestTeamSettingsIsValidSiteNameEmpty(t *testing.T) {
|
||||
c1 := Config{}
|
||||
c1.SetDefaults()
|
||||
|
||||
Reference in New Issue
Block a user