mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 05:34:07 +08:00
Search: Fixed search issue introduced in recent PR (#16652)
This commit is contained in:
@ -288,6 +288,21 @@ func TestDashboardDataAccess(t *testing.T) {
|
|||||||
So(query.Result[0].Title, ShouldEqual, "test dash 23")
|
So(query.Result[0].Title, ShouldEqual, "test dash 23")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Convey("Should be able to filter by tag and type", func() {
|
||||||
|
query := search.FindPersistedDashboardsQuery{
|
||||||
|
OrgId: 1,
|
||||||
|
Type: "dash-db",
|
||||||
|
Tags: []string{"prod"},
|
||||||
|
SignedInUser: &m.SignedInUser{OrgId: 1, OrgRole: m.ROLE_EDITOR},
|
||||||
|
}
|
||||||
|
|
||||||
|
err := SearchDashboards(&query)
|
||||||
|
So(err, ShouldBeNil)
|
||||||
|
|
||||||
|
So(len(query.Result), ShouldEqual, 3)
|
||||||
|
So(query.Result[0].Title, ShouldEqual, "test dash 23")
|
||||||
|
})
|
||||||
|
|
||||||
Convey("Should be able to search for a dashboard folder's children", func() {
|
Convey("Should be able to search for a dashboard folder's children", func() {
|
||||||
query := search.FindPersistedDashboardsQuery{
|
query := search.FindPersistedDashboardsQuery{
|
||||||
OrgId: 1,
|
OrgId: 1,
|
||||||
|
Reference in New Issue
Block a user