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 --------