71 references to Unhealthy
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
315HealthStatus expected = CanConnectToServer ? HealthStatus.Healthy : HealthStatus.Unhealthy;
Aspire.Dashboard (3)
Model\ResourceStateViewModel.cs (1)
133{ KnownState: KnownResourceState.Running, HealthStatus: not HealthStatus.Healthy } => $"{resource.State.Humanize()} ({(resource.HealthStatus ?? HealthStatus.Unhealthy).Humanize()})",
Model\ResourceViewModel.cs (1)
95?? Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Unhealthy;
ResourceService\Partials.cs (1)
71HealthStatus.Unhealthy => Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Unhealthy,
Aspire.Dashboard.Tests (1)
Model\ResourceViewModelTests.cs (1)
26[InlineData(KnownResourceState.Running, DiagnosticsHealthStatus.Unhealthy, new string?[] {null})]
Aspire.Hosting (2)
ApplicationModel\CustomResourceSnapshot.cs (1)
127?? Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Unhealthy;
Dashboard\proto\Partials.cs (1)
98Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Unhealthy => HealthStatus.Unhealthy,
Aspire.Hosting.Qdrant (1)
src\Components\Aspire.Qdrant.Client\QdrantHealthCheck.cs (1)
26: new HealthCheckResult(HealthStatus.Unhealthy);
Aspire.Hosting.Tests (2)
Health\HealthStatusTests.cs (1)
22[InlineData(RunningState, HealthStatus.Unhealthy, new string?[] {null})]
Health\ResourceHealthCheckServiceTests.cs (1)
78Assert.Equal(HealthStatus.Unhealthy, runningEvent.Snapshot.HealthStatus);
Aspire.Milvus.Client (1)
MilvusHealthCheck.cs (1)
28: new HealthCheckResult(HealthStatus.Unhealthy, description: milvusHealthState.ToString());
Aspire.Qdrant.Client (1)
QdrantHealthCheck.cs (1)
26: new HealthCheckResult(HealthStatus.Unhealthy);
HealthChecksSandbox.AppHost (2)
Program.cs (2)
13AddTestResource("unhealthy", HealthStatus.Unhealthy, "I can't do that, Dave.", exceptionMessage: "Feeling unhealthy."); 41return new HealthCheckResult(HealthStatus.Unhealthy, "Initial failure state.");
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
HealthCheckOptions.cs (2)
31{HealthStatus.Unhealthy, StatusCodes.Status503ServiceUnavailable}, 41/// <see cref="HealthStatus.Unhealthy"/> to 503 (Service Unavailable).
HealthCheckResponseWriters.cs (2)
14private static readonly byte[] UnhealthyBytes = Encoding.UTF8.GetBytes(HealthStatus.Unhealthy.ToString()); 23HealthStatus.Unhealthy => httpContext.Response.Body.WriteAsync(UnhealthyBytes.AsMemory()).AsTask(),
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (5)
HealthCheckMiddlewareTests.cs (5)
906Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]); 916Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]); 928[HealthStatus.Unhealthy] = 503 941Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Unhealthy)}", exception.Message); 958Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Unhealthy)}", exception.Message);
Microsoft.Extensions.Diagnostics.HealthChecks (8)
DefaultHealthCheckService.cs (1)
245case HealthStatus.Unhealthy:
DependencyInjection\HealthChecksBuilderAddCheckExtensions.cs (7)
25/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 48/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 77/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 105/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 167/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 196/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 232/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported.
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (9)
HealthCheckRegistration.cs (5)
52/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 67FailureStatus = failureStatus ?? HealthStatus.Unhealthy; 80/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 99/// is <c>null</c>, then <see cref="HealthStatus.Unhealthy"/> will be reported. 119FailureStatus = failureStatus ?? HealthStatus.Unhealthy;
HealthCheckResult.cs (1)
84return new HealthCheckResult(status: HealthStatus.Unhealthy, description, exception, data);
HealthReport.cs (1)
70if (currentValue == HealthStatus.Unhealthy)
HealthStatus.cs (2)
11/// A status of <see cref="Unhealthy"/> should be considered the default value for a failing health check. Application 16/// greater than <see cref="HealthStatus.Unhealthy"/> but less than <see cref="HealthStatus.Healthy"/>.
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (17)
ApplicationLifecycleHealthCheckTests.cs (3)
19Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status); 25Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status); 28Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status);
ManualHealthCheckTests.cs (8)
25Assert.Equal(HealthStatus.Unhealthy, manualHealthCheck.Result.Status); 38Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 43Assert.Equal(HealthStatus.Unhealthy, healthCheckResultUnhealthy.Status); 62Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 68Assert.Equal(HealthStatus.Unhealthy, healthCheckResultUnhealthy.Status); 89Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 97Assert.Equal(HealthStatus.Unhealthy, healthCheckResult2Unhealthy.Status); 104Assert.Equal(HealthStatus.Unhealthy, healthCheckResult1Unhealthy.Status);
TelemetryHealthChecksPublisherTests.cs (6)
42new List<HealthStatus> { HealthStatus.Unhealthy }, 47HealthStatus.Unhealthy.ToString() 58new List<HealthStatus> { HealthStatus.Healthy, HealthStatus.Unhealthy }, 63HealthStatus.Unhealthy.ToString() 66new List<HealthStatus> { HealthStatus.Healthy, HealthStatus.Degraded, HealthStatus.Unhealthy }, 72HealthStatus.Unhealthy.ToString()
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (13)
DefaultHealthCheckServiceTest.cs (8)
111Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 143Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 152Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 297Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 304Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 555Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status); 600b.AddCheck<FailCapturingCheck>("unhealthy", HealthStatus.Unhealthy); 622Assert.Equal(HealthStatus.Unhealthy, actual.Value.Status);
DependencyInjection\HealthChecksBuilderTest.cs (4)
128Assert.Equal(HealthStatus.Unhealthy, registration.FailureStatus); 151Assert.Equal(HealthStatus.Unhealthy, registration.FailureStatus); 174Assert.Equal(HealthStatus.Unhealthy, registration.FailureStatus); 197Assert.Equal(HealthStatus.Unhealthy, registration.FailureStatus);
HealthReportTest.cs (1)
17[InlineData(HealthStatus.Unhealthy)]
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
MockHealthCheckService.cs (1)
15private readonly Task<HealthReport> _unhealthyReport = CreateHealthReport(HealthStatus.Unhealthy);