22 writes to HealthStatus
Aspire.Cli.Tests (22)
Backchannel\TrayResourceHealthTests.cs (8)
39HealthStatus = health, 57HealthStatus = "Unhealthy", 73new() { Name = "hidden-state", State = "Hidden", HealthStatus = "Unhealthy" }, 83[.. resources, new() { Name = "api", State = "Running", HealthStatus = "Healthy" }])); 91new() { Name = "api", State = "Running", HealthStatus = "Healthy" }, 95Name = "generator", State = "NotStarted", HealthStatus = "Unhealthy", 111new() { Name = "api", State = "Running", HealthStatus = "Healthy" }, 113new() { Name = "database", State = "Running", HealthStatus = "Unhealthy" }
Backchannel\TrayWatchStreamTests.cs (9)
733new() { Name = "cache", State = "Running", HealthStatus = "Healthy", Version = 1 } 758resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running", HealthStatus = "Healthy", Version = 2 }); 761resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Degraded", Version = 2 }); 764resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Unhealthy", Version = 3 }); 767resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Healthy", Version = 4 }); 770resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running", HealthStatus = "Unhealthy", Version = 1 }); 874connection.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }]; 915initial.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }]; 981initial.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }];
Commands\AgentMcpCommandTests.cs (1)
839HealthStatus = currentState == "Running" ? "Healthy" : null
Commands\DescribeCommandTests.cs (1)
52new() { Name = "running", ResourceType = "Project", State = "Running", HealthStatus = "Healthy" },
Mcp\ListResourcesToolTests.cs (1)
673HealthStatus = index == 0 ? longText : null,
Mcp\WaitForResourcesToolTests.cs (2)
94HealthStatus = "Healthy" 374HealthStatus = "Healthy",
9 references to HealthStatus
aspire (9)
Backchannel\ResourceSnapshotMapper.cs (1)
156HealthStatus = snapshot.HealthStatus,
Backchannel\TrayResourceHealth.cs (5)
58|| (IsHealth(resource.HealthStatus, "Unhealthy") && !pendingCheck)) 68|| IsHealth(resource.HealthStatus, "Degraded") 77&& resource.HealthStatus is null && resource.HealthReports.Length == 0)) 89return (resource.HealthStatus is null || IsHealth(resource.HealthStatus, "Healthy"))
Commands\DescribeCommand.cs (2)
406var healthText = ColorHealth(snapshot.HealthStatus?.EscapeMarkup() ?? "-"); 433return new ResourceDisplayState(displayName, snapshot.State, snapshot.HealthStatus, endpoints);
Mcp\Tools\ListResourcesTool.cs (1)
214HealthStatus = GetBoundedText(snapshot.HealthStatus),