mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 16:22:35 +08:00
feat(plugins): worked on plugin dashboard import handling
This commit is contained in:
@ -27,14 +27,15 @@ func TestPluginScans(t *testing.T) {
|
||||
|
||||
Convey("When reading app plugin definition", t, func() {
|
||||
setting.Cfg = ini.Empty()
|
||||
sec, _ := setting.Cfg.NewSection("plugin.app-test")
|
||||
sec.NewKey("path", "../../tests/app-plugin-json")
|
||||
sec, _ := setting.Cfg.NewSection("plugin.nginx-app")
|
||||
sec.NewKey("path", "../../examples/nginx-app")
|
||||
err := Init()
|
||||
|
||||
So(err, ShouldBeNil)
|
||||
So(len(Apps), ShouldBeGreaterThan, 0)
|
||||
So(Apps["app-example"].Info.Logos.Large, ShouldEqual, "public/plugins/app-example/img/logo_large.png")
|
||||
So(Apps["app-example"].Info.Screenshots[1].Path, ShouldEqual, "public/plugins/app-example/img/screenshot2.png")
|
||||
|
||||
So(Apps["nginx-app"].Info.Logos.Large, ShouldEqual, "public/plugins/nginx-app/img/logo_large.png")
|
||||
So(Apps["nginx-app"].Info.Screenshots[1].Path, ShouldEqual, "public/plugins/nginx-app/img/screenshot2.png")
|
||||
})
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user