فهرست منبع

fix plugin unit test

woodsaj 10 سال پیش
والد
کامیت
4f6a52503d
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      pkg/plugins/plugins_test.go

+ 3 - 2
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)