коммит произвёл
GitHub
родитель
0332e1545d
Коммит
8a2832223c
2
Makefile
2
Makefile
@@ -115,7 +115,7 @@ PLUGIN_PACKAGES += mattermost-plugin-channel-export-v0.2.2
|
||||
PLUGIN_PACKAGES += mattermost-plugin-custom-attributes-v1.3.0
|
||||
PLUGIN_PACKAGES += mattermost-plugin-github-v2.0.1
|
||||
PLUGIN_PACKAGES += mattermost-plugin-gitlab-v1.3.0
|
||||
PLUGIN_PACKAGES += mattermost-plugin-playbooks-v1.16.1
|
||||
PLUGIN_PACKAGES += mattermost-plugin-playbooks-v1.20.0
|
||||
PLUGIN_PACKAGES += mattermost-plugin-jenkins-v1.1.0
|
||||
PLUGIN_PACKAGES += mattermost-plugin-jira-v2.4.0
|
||||
PLUGIN_PACKAGES += mattermost-plugin-nps-v1.1.0
|
||||
|
||||
@@ -339,6 +339,9 @@ func TestDiff(t *testing.T) {
|
||||
"com.mattermost.nps": {
|
||||
Enable: !defaultConfigGen().PluginSettings.PluginStates["com.mattermost.nps"].Enable,
|
||||
},
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -365,6 +368,9 @@ func TestDiff(t *testing.T) {
|
||||
"com.mattermost.newplugin": {
|
||||
Enable: true,
|
||||
},
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -382,9 +388,11 @@ func TestDiff(t *testing.T) {
|
||||
{
|
||||
Path: "PluginSettings.PluginStates",
|
||||
BaseVal: defaultConfigGen().PluginSettings.PluginStates,
|
||||
ActualVal: func() interface{} {
|
||||
return map[string]*model.PluginState{}
|
||||
}(),
|
||||
ActualVal: map[string]*model.PluginState{
|
||||
"playbooks": {
|
||||
Enable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"",
|
||||
|
||||
@@ -2703,7 +2703,7 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) {
|
||||
s.PluginStates["com.mattermost.nps"] = &PluginState{Enable: ls.EnableDiagnostics == nil || *ls.EnableDiagnostics}
|
||||
}
|
||||
|
||||
if s.PluginStates["playbooks"] == nil && BuildEnterpriseReady == "true" {
|
||||
if s.PluginStates["playbooks"] == nil {
|
||||
// Enable the playbooks plugin by default
|
||||
s.PluginStates["playbooks"] = &PluginState{Enable: true}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ func TestConfigDefaultNPSPluginState(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestConfigDefaultIncidentManagementPluginState(t *testing.T) {
|
||||
func TestConfigDefaultPlaybooksPluginState(t *testing.T) {
|
||||
t.Run("should enable Playbooks plugin by default on enterprise-ready builds", func(t *testing.T) {
|
||||
BuildEnterpriseReady = "true"
|
||||
c1 := Config{}
|
||||
@@ -317,15 +317,15 @@ func TestConfigDefaultIncidentManagementPluginState(t *testing.T) {
|
||||
assert.True(t, c1.PluginSettings.PluginStates["playbooks"].Enable)
|
||||
})
|
||||
|
||||
t.Run("should not enable Playbooks plugin by default on non-enterprise-ready builds", func(t *testing.T) {
|
||||
t.Run("should enable Playbooks plugin by default on non-enterprise-ready builds", func(t *testing.T) {
|
||||
BuildEnterpriseReady = ""
|
||||
c1 := Config{}
|
||||
c1.SetDefaults()
|
||||
|
||||
assert.Nil(t, c1.PluginSettings.PluginStates["playbooks"])
|
||||
assert.True(t, c1.PluginSettings.PluginStates["playbooks"].Enable)
|
||||
})
|
||||
|
||||
t.Run("should not re-enable IncidentManagement plugin after it has been disabled", func(t *testing.T) {
|
||||
t.Run("should not re-enable Playbooks plugin after it has been disabled", func(t *testing.T) {
|
||||
BuildEnterpriseReady = ""
|
||||
c1 := Config{
|
||||
PluginSettings: PluginSettings{
|
||||
|
||||
@@ -29,10 +29,9 @@ type FeatureFlags struct {
|
||||
AppsEnabled bool
|
||||
|
||||
// Feature flags to control plugin versions
|
||||
PluginIncidentManagement string `plugin_id:"com.mattermost.plugin-incident-management"`
|
||||
PluginPlaybooks string `plugin_id:"playbooks"`
|
||||
PluginApps string `plugin_id:"com.mattermost.apps"`
|
||||
PluginFocalboard string `plugin_id:"focalboard"`
|
||||
PluginPlaybooks string `plugin_id:"playbooks"`
|
||||
PluginApps string `plugin_id:"com.mattermost.apps"`
|
||||
PluginFocalboard string `plugin_id:"focalboard"`
|
||||
|
||||
// Enable timed dnd support for user status
|
||||
TimedDND bool
|
||||
@@ -59,7 +58,6 @@ func (f *FeatureFlags) SetDefaults() {
|
||||
f.CollapsedThreads = true
|
||||
f.EnableRemoteClusterService = false
|
||||
f.AppsEnabled = false
|
||||
f.PluginIncidentManagement = "1.16.1"
|
||||
f.PluginApps = ""
|
||||
f.PluginFocalboard = ""
|
||||
f.TimedDND = false
|
||||
|
||||
Ссылка в новой задаче
Block a user