diff --git a/misc/checks.py b/misc/checks.py index 4dcda77..8fa1c64 100644 --- a/misc/checks.py +++ b/misc/checks.py @@ -201,6 +201,15 @@ def raid_check() -> list[alerts.Alert]: ) continue + if IS_TESTING: + alert_list.append( + alerts.Alert( + alert_type=alerts.AlertType.RAID, + message=f"Test alert: LV {lv} health is {lv_attr.health}", + severity=alerts.Severity.INFO, + ) + ) + match lv_attr.health: case LVAttr.Health.PARTIAL: alert_list.append( @@ -255,7 +264,7 @@ def disk_wearout_check() -> list[alerts.Alert]: logging.error(traceback.format_exc()) continue - if wearout_reading.current_reading < wearout_reading.threshold_reading: + if IS_TESTING or wearout_reading.current_reading < wearout_reading.threshold_reading: match wearout_reading.indicator: case WearoutIndicator.REALLOCATED_SECTORS: message = f"Disk {disk['name']} has reallocated sectors (curr {wearout_reading.current_reading}, thresh {wearout_reading.threshold_reading})"