app/pluginservice: move plugin out from the Channels product (#21697)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-11-24 11:13:29 +03:00
коммит произвёл GitHub
родитель 5e5769c4ee
Коммит 6c55c4d356
31 изменённых файлов: 497 добавлений и 408 удалений

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

@@ -73,7 +73,7 @@ func TestInstallPluginLocally(t *testing.T) {
th := Setup(t)
defer th.TearDown()
actualManifest, appErr := th.App.ch.installPluginLocally(&nilReadSeeker{}, nil, installPluginLocallyOnlyIfNew)
actualManifest, appErr := th.App.PluginService().installPluginLocally(&nilReadSeeker{}, nil, installPluginLocallyOnlyIfNew)
require.NotNil(t, appErr)
assert.Equal(t, "app.plugin.extract.app_error", appErr.Id, appErr.Error())
require.Nil(t, actualManifest)
@@ -87,7 +87,7 @@ func TestInstallPluginLocally(t *testing.T) {
{"test", "test file"},
})
actualManifest, appErr := th.App.ch.installPluginLocally(reader, nil, installPluginLocallyOnlyIfNew)
actualManifest, appErr := th.App.PluginService().installPluginLocally(reader, nil, installPluginLocallyOnlyIfNew)
require.NotNil(t, appErr)
assert.Equal(t, "app.plugin.manifest.app_error", appErr.Id, appErr.Error())
require.Nil(t, actualManifest)
@@ -106,7 +106,7 @@ func TestInstallPluginLocally(t *testing.T) {
{"plugin.json", string(manifestJSON)},
})
actualManifest, appError := th.App.ch.installPluginLocally(reader, nil, installationStrategy)
actualManifest, appError := th.App.PluginService().installPluginLocally(reader, nil, installationStrategy)
if actualManifest != nil {
require.Equal(t, manifest, actualManifest)
}
@@ -134,7 +134,7 @@ func TestInstallPluginLocally(t *testing.T) {
require.NoError(t, err)
for _, bundleInfo := range bundleInfos {
err := th.App.ch.removePluginLocally(bundleInfo.Manifest.Id)
err := th.App.PluginService().removePluginLocally(bundleInfo.Manifest.Id)
require.Nilf(t, err, "failed to remove existing plugin %s", bundleInfo.Manifest.Id)
}
}