MM-16261 - Store Plugin in File Store (#11511)
* Implemneted saving the plugin bundle on the file store upon plugin upload * Fixed compilation error * Fixed compilation issue * Added deletion from file store upon plugin uninstall * Added condition to delete from store only when exists. Added case of saving the bundle to the store when uploading from url. Added checks in plugin tests * Fixed compilation error * Moved storage of plugin bundle within app/installPlugin * Moved storing to filestore before enabling the plugin * Fixed error handling * Code styling improvements * Minor styling fix
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
b464f31b38
Коммит
859c571558
@@ -57,6 +57,11 @@ func TestPlugin(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
assert.Equal(t, "testplugin", manifest.Id)
|
||||
|
||||
// Stored in File Store: Install Plugin from URL case
|
||||
pluginStored, err := th.App.FileExists("./plugins/" + manifest.Id + ".tar.gz")
|
||||
assert.Nil(t, err)
|
||||
assert.True(t, pluginStored)
|
||||
|
||||
th.App.RemovePlugin(manifest.Id)
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.PluginSettings.Enable = false })
|
||||
@@ -89,6 +94,11 @@ func TestPlugin(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "testplugin", manifest.Id)
|
||||
|
||||
// Stored in File Store: Upload Plugin case
|
||||
pluginStored, err = th.App.FileExists("./plugins/" + manifest.Id + ".tar.gz")
|
||||
assert.Nil(t, err)
|
||||
assert.True(t, pluginStored)
|
||||
|
||||
// Upload error cases
|
||||
_, resp = th.SystemAdminClient.UploadPlugin(bytes.NewReader([]byte("badfile")))
|
||||
CheckBadRequestStatus(t, resp)
|
||||
|
||||
Ссылка в новой задаче
Block a user