Revert "[MM-48626] Move plugins environment out of Channels (#21730)" (#21934)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-12-21 22:10:26 +03:00
коммит произвёл GitHub
родитель 45159a6b09
Коммит c252704140
40 изменённых файлов: 447 добавлений и 537 удалений

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

@@ -282,7 +282,7 @@ func TestPublicFilesRequest(t *testing.T) {
defer os.RemoveAll(pluginDir)
defer os.RemoveAll(webappPluginDir)
env, err := plugin.NewEnvironment(th.NewPluginAPI, app.NewDriverImpl(th.Server.Platform()), pluginDir, webappPluginDir, false, th.App.Log(), nil)
env, err := plugin.NewEnvironment(th.NewPluginAPI, app.NewDriverImpl(th.Server), pluginDir, webappPluginDir, false, th.App.Log(), nil)
require.NoError(t, err)
pluginID := "com.mattermost.sample"
@@ -329,7 +329,7 @@ func TestPublicFilesRequest(t *testing.T) {
require.NotNil(t, manifest)
require.True(t, activated)
th.App.PluginService().SetPluginsEnvironment(env)
th.App.Channels().SetPluginsEnvironment(env)
req, _ := http.NewRequest("GET", "/plugins/com.mattermost.sample/public/hello.html", nil)
res := httptest.NewRecorder()