Fix tests
CI / backend (push) Failing after 8m50s
CI / frontend (push) Failing after 1m45s

This commit is contained in:
voltsrage
2026-08-05 20:21:23 +08:00
parent b44954545b
commit a6a491a2da
16 changed files with 104 additions and 15 deletions
@@ -10,7 +10,15 @@ public static class ExplainableAlertsTestHelper
public static readonly JsonSerializerOptions JsonOptions = new()
{
PropertyNameCaseInsensitive = true,
Converters = { new JsonStringEnumConverter() }
Converters =
{
// Must match API Program.cs converters — AlertType/Severity/Status
// serialize as DB strings (e.g. "GCS_CRITICAL"), not enum names.
new AlertTypeJsonConverter(),
new AlertSeverityJsonConverter(),
new AlertStatusJsonConverter(),
new JsonStringEnumConverter()
}
};
private static readonly DateTimeOffset TrendBaseTime =