Skip to content

Commit 2770507

Browse files
committed
Fix test nullref
1 parent ae13bea commit 2770507

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/WebJobs.Script.Tests/Diagnostics/HealthChecks/HealthCheckWaitMiddlewareTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ private static DefaultHttpContext CreateContext(string query, Stream body)
107107
{
108108
DefaultHttpContext context = new();
109109
context.Request.QueryString = new(query);
110-
context.Response.Body = body;
110+
if (body is not null)
111+
{
112+
context.Response.Body = body;
113+
}
114+
111115
return context;
112116
}
113117
}

0 commit comments

Comments
 (0)