MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)

* Moving plugins to use hashicorp go-plugin.

* Tweaks from feedback.
Этот коммит содержится в:
Christopher Speller
2018-06-25 12:33:13 -07:00
коммит произвёл GitHub
родитель ecefa6cdd1
Коммит 1e5c432e10
303 изменённых файлов: 52150 добавлений и 9404 удалений

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

@@ -49,6 +49,7 @@ type TestHelper struct {
SystemAdminClient *model.Client4
SystemAdminUser *model.User
tempWorkspace string
}
type persistentTestStore struct {
@@ -137,6 +138,25 @@ func setupTestHelper(enterprise bool) *TestHelper {
th.Client = th.CreateClient()
th.SystemAdminClient = th.CreateClient()
if th.tempWorkspace == "" {
dir, err := ioutil.TempDir("", "apptest")
if err != nil {
panic(err)
}
th.tempWorkspace = dir
}
pluginDir := filepath.Join(th.tempWorkspace, "plugins")
webappDir := filepath.Join(th.tempWorkspace, "webapp")
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.PluginSettings.Directory = pluginDir
*cfg.PluginSettings.ClientDirectory = webappDir
})
th.App.InitPlugins(pluginDir, webappDir)
return th
}