From e0b6ce83cf351fca69d7863fedf3569a53fd49b4 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sat, 25 Jul 2026 00:17:31 +0200 Subject: [PATCH] fix null warnings --- .../IngestOnDemandDiagnosticsTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Backend/AutopilotMonitor.Functions.Tests/IngestOnDemandDiagnosticsTests.cs b/src/Backend/AutopilotMonitor.Functions.Tests/IngestOnDemandDiagnosticsTests.cs index cbcd4a4d..2396e990 100644 --- a/src/Backend/AutopilotMonitor.Functions.Tests/IngestOnDemandDiagnosticsTests.cs +++ b/src/Backend/AutopilotMonitor.Functions.Tests/IngestOnDemandDiagnosticsTests.cs @@ -75,8 +75,10 @@ public class IngestOnDemandDiagnosticsTests public void NullEventOrData_IsNotAConfirmation() { Assert.False(EventIngestProcessor.IsOnDemandDiagnosticsUploadConfirmation(null)); + // Data is non-nullable on the model but the JSON deserializer can still hand us null + // for a payload without "data" — null! pins the guard the predicate actually has. Assert.False(EventIngestProcessor.IsOnDemandDiagnosticsUploadConfirmation( - new EnrollmentEvent { EventType = "server_action_executed", Data = null })); + new EnrollmentEvent { EventType = "server_action_executed", Data = null! })); } // -------- InferDiagnosticsDestination --------