mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
test: added integration test for #10941
This commit is contained in:
@@ -80,6 +80,14 @@ func TestAlertingDataAccess(t *testing.T) {
|
|||||||
So(alert.State, ShouldEqual, "pending")
|
So(alert.State, ShouldEqual, "pending")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Convey("Viewer cannot read alerts", func() {
|
||||||
|
alertQuery := m.GetAlertsQuery{DashboardId: testDash.Id, PanelId: 1, OrgId: 1, User: &m.SignedInUser{OrgRole: m.ROLE_VIEWER}}
|
||||||
|
err2 := HandleAlertsQuery(&alertQuery)
|
||||||
|
|
||||||
|
So(err2, ShouldBeNil)
|
||||||
|
So(alertQuery.Result, ShouldHaveLength, 0)
|
||||||
|
})
|
||||||
|
|
||||||
Convey("Alerts with same dashboard id and panel id should update", func() {
|
Convey("Alerts with same dashboard id and panel id should update", func() {
|
||||||
modifiedItems := items
|
modifiedItems := items
|
||||||
modifiedItems[0].Name = "Name"
|
modifiedItems[0].Name = "Name"
|
||||||
|
|||||||
Reference in New Issue
Block a user