bergquist 8 лет назад
Родитель
Сommit
b511788c51

+ 1 - 1
pkg/plugins/dashboard_importer_test.go

@@ -92,7 +92,7 @@ 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.TODO())
+		err := initPlugins(context.Background())
 
 		So(err, ShouldBeNil)
 

+ 1 - 1
pkg/plugins/dashboards_test.go

@@ -18,7 +18,7 @@ func TestPluginDashboards(t *testing.T) {
 		setting.Cfg = ini.Empty()
 		sec, _ := setting.Cfg.NewSection("plugin.test-app")
 		sec.NewKey("path", "../../tests/test-app")
-		err := initPlugins(context.TODO())
+		err := initPlugins(context.Background())
 
 		So(err, ShouldBeNil)
 

+ 0 - 2
pkg/plugins/plugins.go

@@ -35,8 +35,6 @@ type PluginScanner struct {
 	errors     []error
 }
 
-type Dispose func()
-
 type PluginManager struct {
 	log log.Logger
 }

+ 2 - 2
pkg/plugins/plugins_test.go

@@ -15,7 +15,7 @@ func TestPluginScans(t *testing.T) {
 	Convey("When scaning for plugins", t, func() {
 		setting.StaticRootPath, _ = filepath.Abs("../../public/")
 		setting.Cfg = ini.Empty()
-		err := initPlugins(context.TODO())
+		err := initPlugins(context.Background())
 
 		So(err, ShouldBeNil)
 		So(len(DataSources), ShouldBeGreaterThan, 1)
@@ -30,7 +30,7 @@ func TestPluginScans(t *testing.T) {
 		setting.Cfg = ini.Empty()
 		sec, _ := setting.Cfg.NewSection("plugin.nginx-app")
 		sec.NewKey("path", "../../tests/test-app")
-		err := initPlugins(context.TODO())
+		err := initPlugins(context.Background())
 
 		So(err, ShouldBeNil)
 		So(len(Apps), ShouldBeGreaterThan, 0)