Commit 3f507833 by bergquist

tests: uses different paths depending on os

parent 2bd4c14e
......@@ -49,13 +49,16 @@ func TestCreatingNewDashboardFileReader(t *testing.T) {
})
Convey("using full path", func() {
cfg.Options["folder"] = "/var/lib/grafana/dashboards"
fullPath := "/var/lib/grafana/dashboards"
if runtime.GOOS == "windows" {
fullPath = `c:\var\lib\grafana`
}
cfg.Options["folder"] = fullPath
reader, err := NewDashboardFileReader(cfg, log.New("test-logger"))
So(err, ShouldBeNil)
if runtime.GOOS != "windows" {
So(reader.Path, ShouldEqual, "/var/lib/grafana/dashboards")
}
So(reader.Path, ShouldEqual, fullPath)
So(filepath.IsAbs(reader.Path), ShouldBeTrue)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment