mirror of https://github.com/statping/statping
notifier testing
parent
1cfc5b4bda
commit
0ee9cffb78
|
@ -21,7 +21,11 @@ func FindNotifier(method string) *notifications.Notification {
|
||||||
n := allNotifiers[method]
|
n := allNotifiers[method]
|
||||||
if n != nil {
|
if n != nil {
|
||||||
notif := n.Select()
|
notif := n.Select()
|
||||||
no, _ := notifications.Find(notif.Method)
|
no, err := notifications.Find(notif.Method)
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return notif.UpdateFields(no)
|
return notif.UpdateFields(no)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -200,7 +200,7 @@ func startupDb(t *testing.T) {
|
||||||
db.Create(&fail2)
|
db.Create(&fail2)
|
||||||
db.Create(&incident1)
|
db.Create(&incident1)
|
||||||
db.Create(&incidentUpdate1)
|
db.Create(&incidentUpdate1)
|
||||||
db.Create(&incidentUpdate1)
|
db.Create(¬ification.Notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestServices(t *testing.T) {
|
func TestServices(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue