MM-18517: Plugin Marketplace (Phase 2) (#13086)

* MM-17549: use StatusNotFound when deleting plugin (#12983)

Trying to delete a plugin that does not exist should fail with a 404, not a 400.

Relates-to: https://mattermost.atlassian.net/browse/MM-17549

* MM-19630: marketplace: model ReleaseNotesURL (#13083)

Automatic Merge

* MM-20065: allow prepackaged plugin upgrade (#13076)

* MM-20065: allow prepackaged plugin upgrade

When locally installing prepackaged plugins, skip if a plugin exists with the same id and is the same or a newer version.

This is effectively a "poor man's" rework of prepackaged plugins to allow upgrade of prepackaged plugins via the marketplace. The larger plan to rework prepackaged plugins was deferred from v5.18.

Fixes: https://mattermost.atlassian.net/browse/MM-20065

* eliminate unnecessary installPlugin

* fix TestPluginSync defaults to match minio

* cleanExistingBundles

* close prepackaged filereader

* simplify
Этот коммит содержится в:
Jesse Hallam
2019-11-18 13:40:49 -04:00
коммит произвёл GitHub
родитель 4d1c6cd446
Коммит 2571d97723
7 изменённых файлов: 340 добавлений и 27 удалений

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

@@ -206,7 +206,7 @@ func TestPlugin(t *testing.T) {
// Deactivate error case
ok, resp = th.SystemAdminClient.DisablePlugin("junk")
CheckBadRequestStatus(t, resp)
CheckNotFoundStatus(t, resp)
assert.False(t, ok)
// Get error cases
@@ -241,7 +241,7 @@ func TestPlugin(t *testing.T) {
// Remove error cases
ok, resp = th.SystemAdminClient.RemovePlugin(manifest.Id)
CheckBadRequestStatus(t, resp)
CheckNotFoundStatus(t, resp)
assert.False(t, ok)
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.PluginSettings.Enable = false })
@@ -253,7 +253,7 @@ func TestPlugin(t *testing.T) {
CheckForbiddenStatus(t, resp)
_, resp = th.SystemAdminClient.RemovePlugin("bad.id")
CheckBadRequestStatus(t, resp)
CheckNotFoundStatus(t, resp)
}
func TestNotifyClusterPluginEvent(t *testing.T) {