Linting fixes for provisoning (#23600)

This commit is contained in:
Carl Bergquist
2020-04-16 05:46:20 +02:00
committed by GitHub
parent 6e313e7d37
commit 5fc255bd89
11 changed files with 90 additions and 88 deletions
@@ -59,7 +59,7 @@ func TestDashboardsAsConfig(t *testing.T) {
})
})
}
func validateDashboardAsConfig(t *testing.T, cfg []*DashboardsAsConfig) {
func validateDashboardAsConfig(t *testing.T, cfg []*config) {
t.Helper()
So(len(cfg), ShouldEqual, 2)
@@ -67,9 +67,9 @@ func validateDashboardAsConfig(t *testing.T, cfg []*DashboardsAsConfig) {
ds := cfg[0]
So(ds.Name, ShouldEqual, "general dashboards")
So(ds.Type, ShouldEqual, "file")
So(ds.OrgId, ShouldEqual, 2)
So(ds.OrgID, ShouldEqual, 2)
So(ds.Folder, ShouldEqual, "developers")
So(ds.FolderUid, ShouldEqual, "xyz")
So(ds.FolderUID, ShouldEqual, "xyz")
So(ds.Editable, ShouldBeTrue)
So(len(ds.Options), ShouldEqual, 1)
So(ds.Options["path"], ShouldEqual, "/var/lib/grafana/dashboards")
@@ -79,9 +79,9 @@ func validateDashboardAsConfig(t *testing.T, cfg []*DashboardsAsConfig) {
ds2 := cfg[1]
So(ds2.Name, ShouldEqual, "default")
So(ds2.Type, ShouldEqual, "file")
So(ds2.OrgId, ShouldEqual, 1)
So(ds2.OrgID, ShouldEqual, 1)
So(ds2.Folder, ShouldEqual, "")
So(ds2.FolderUid, ShouldEqual, "")
So(ds2.FolderUID, ShouldEqual, "")
So(ds2.Editable, ShouldBeFalse)
So(len(ds2.Options), ShouldEqual, 1)
So(ds2.Options["path"], ShouldEqual, "/var/lib/grafana/dashboards")