From 4f6a52503d952c25af21949a19177932b81e44be Mon Sep 17 00:00:00 2001 From: woodsaj Date: Fri, 27 Nov 2015 17:04:43 +0800 Subject: [PATCH] fix plugin unit test --- pkg/plugins/plugins_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/plugins/plugins_test.go b/pkg/plugins/plugins_test.go index 4d3e2c98836..d0027ccec64 100644 --- a/pkg/plugins/plugins_test.go +++ b/pkg/plugins/plugins_test.go @@ -4,14 +4,15 @@ import ( "path/filepath" "testing" + "github.com/grafana/grafana/pkg/setting" . "github.com/smartystreets/goconvey/convey" ) func TestPluginScans(t *testing.T) { Convey("When scaning for plugins", t, func() { - path, _ := filepath.Abs("../../public/app/plugins") - err := scan(path) + setting.StaticRootPath = filepath.Abs("../../public/") + err := Init() So(err, ShouldBeNil) So(len(DataSources), ShouldBeGreaterThan, 1)