feat(alerting): removed severity

This commit is contained in:
Torkel Ödegaard
2016-09-13 15:09:55 +02:00
parent 6375418d8c
commit b0c7e61ef8
23 changed files with 143 additions and 238 deletions

View File

@@ -159,7 +159,7 @@ func upsertAlerts(existingAlerts []*m.Alert, cmd *m.SaveAlertsCommand, sess *xor
} else {
alert.Updated = time.Now()
alert.Created = time.Now()
alert.State = m.AlertStateUnknown
alert.State = m.AlertStateNoData
alert.NewStateDate = time.Now()
_, err := sess.Insert(alert)

View File

@@ -47,7 +47,7 @@ func TestAlertingDataAccess(t *testing.T) {
So(err2, ShouldBeNil)
So(alert.Name, ShouldEqual, "Alerting title")
So(alert.Message, ShouldEqual, "Alerting message")
So(alert.State, ShouldEqual, "unknown")
So(alert.State, ShouldEqual, "no_data")
So(alert.Frequency, ShouldEqual, 1)
})
@@ -77,7 +77,7 @@ func TestAlertingDataAccess(t *testing.T) {
So(query.Result[0].Name, ShouldEqual, "Name")
Convey("Alert state should not be updated", func() {
So(query.Result[0].State, ShouldEqual, "unknown")
So(query.Result[0].State, ShouldEqual, "no_data")
})
})