mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed failing dashboard sql test
This commit is contained in:
@@ -89,7 +89,6 @@ func (ctx *Context) Handle(status int, title string, err error) {
|
||||
}
|
||||
|
||||
ctx.Data["Title"] = title
|
||||
|
||||
ctx.HTML(status, strconv.Itoa(status))
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,10 @@ func SearchDashboards(query *m.SearchDashboardsQuery) error {
|
||||
params = append(params, query.Tag)
|
||||
}
|
||||
|
||||
if query.Limit == 0 || query.Limit > 10000 {
|
||||
query.Limit = 300
|
||||
}
|
||||
|
||||
sql.WriteString(fmt.Sprintf(" LIMIT %d", query.Limit))
|
||||
|
||||
var res []DashboardSearchProjection
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestDashboardDataAccess(t *testing.T) {
|
||||
|
||||
Convey("Should be able to search for dashboard", func() {
|
||||
query := m.SearchDashboardsQuery{
|
||||
Title: "%test%",
|
||||
Title: "test",
|
||||
AccountId: 1,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user