@@ -24,15 +24,15 @@ class AlertTests : ESTestCase() {
24
24
25
25
val templateArgs = alert.asTemplateArg()
26
26
27
- assertEquals(" Template args state does not match" , templateArgs[" state " ], alert.state.toString() )
28
- assertEquals(" Template args error message does not match" , templateArgs[" error_message " ], alert.errorMessage )
29
- assertEquals(
30
- " Template args acknowledged time does not match" ,
31
- templateArgs[" acknowledged_time " ],
32
- alert.acknowledgedTime ?.toEpochMilli())
33
- assertEquals(" Template args last notification time does not match " ,
34
- templateArgs[" last_notification_time " ],
35
- alert.lastNotificationTime?.toEpochMilli() )
27
+ assertEquals(" Template args id does not match" , templateArgs[Alert . ALERT_ID_FIELD ], alert.id )
28
+ assertEquals(" Template args version does not match" , templateArgs[Alert . ALERT_VERSION_FIELD ], alert.version )
29
+ assertEquals(" Template args state does not match " , templateArgs[ Alert . STATE_FIELD ], alert.state.toString())
30
+ assertEquals( " Template args error message does not match" , templateArgs[ Alert . ERROR_MESSAGE_FIELD ], alert.errorMessage)
31
+ assertEquals( " Template args acknowledged time does not match " , templateArgs[Alert . ACKNOWLEDGED_TIME_FIELD ], null )
32
+ assertEquals( " Template args end time does not " , templateArgs[ Alert . END_TIME_FIELD ], alert.endTime ?.toEpochMilli())
33
+ assertEquals(" Template args start time does not" , templateArgs[ Alert . START_TIME_FIELD ], alert.startTime.toEpochMilli())
34
+ assertEquals( " Template args last notification time does not match " , templateArgs[Alert . LAST_NOTIFICATION_TIME_FIELD ], null )
35
+ assertEquals( " Template args severity does not match " , templateArgs[ Alert . SEVERITY_FIELD ], alert.severity )
36
36
}
37
37
38
38
fun `test alert acknowledged` () {
0 commit comments