Refactoring PluginManager to be a self registering service (#11755)

* refator: refactored PluginManager to be a self registering service, a lot more work needed to fully make plugin manager use instance variables and not so many globals
This commit is contained in:
Torkel Ödegaard
2018-04-27 15:11:55 +02:00
committed by Carl Bergquist
parent 8f29d28572
commit a8eed9d344
8 changed files with 64 additions and 74 deletions
+3 -3
View File
@@ -1,7 +1,6 @@
package plugins
import (
"context"
"io/ioutil"
"testing"
@@ -91,10 +90,11 @@ func pluginScenario(desc string, t *testing.T, fn func()) {
setting.Cfg = ini.Empty()
sec, _ := setting.Cfg.NewSection("plugin.test-app")
sec.NewKey("path", "../../tests/test-app")
err := initPlugins(context.Background())
pm := &PluginManager{}
err := pm.Init()
So(err, ShouldBeNil)
Convey(desc, fn)
})
}