pkg/plugins: Check errors (#19715)

* pkg/plugins: Check errors
This commit is contained in:
Arve Knudsen
2019-10-11 21:02:15 +02:00
committed by GitHub
parent f0264ebe43
commit 0b1913af6f
5 changed files with 90 additions and 46 deletions

View File

@ -12,15 +12,14 @@ import (
)
func TestPluginDashboards(t *testing.T) {
Convey("When asking plugin dashboard info", t, func() {
setting.Raw = ini.Empty()
sec, _ := setting.Raw.NewSection("plugin.test-app")
sec.NewKey("path", "testdata/test-app")
_, err := sec.NewKey("path", "testdata/test-app")
So(err, ShouldBeNil)
pm := &PluginManager{}
err := pm.Init()
err = pm.Init()
So(err, ShouldBeNil)
bus.AddHandler("test", func(query *m.GetDashboardQuery) error {