mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 08:52:14 +08:00
Sqlstore: guard against getting a dashboard without specifying identi… (#22246)
* Sqlstore: guard against getting a dashboard without specifying identifier * Sqlstore: linting
This commit is contained in:
@ -88,6 +88,15 @@ func TestDashboardDataAccess(t *testing.T) {
|
||||
So(query.Result.IsFolder, ShouldBeFalse)
|
||||
})
|
||||
|
||||
Convey("Shouldn't be able to get a dashboard with just an OrgID", func() {
|
||||
query := m.GetDashboardQuery{
|
||||
OrgId: 1,
|
||||
}
|
||||
|
||||
err := GetDashboard(&query)
|
||||
So(err, ShouldEqual, m.ErrDashboardIdentifierNotSet)
|
||||
})
|
||||
|
||||
Convey("Should be able to delete dashboard", func() {
|
||||
dash := insertTestDashboard("delete me", 1, 0, false, "delete this")
|
||||
|
||||
|
Reference in New Issue
Block a user