15 writes to Health
aspire (1)
Backchannel\TrayWatchStream.cs (1)
291
AppHosts = hosts.Select((host, index) => host with {
Health
= healthSubscriptions[candidates[index].Connection].Health })
Aspire.Cli.Tests (14)
Backchannel\TrayWatchStreamTests.cs (14)
759
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
762
Assert.Equal(initial with {
Health
= "warning" }, await ReadHostAsync());
765
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
768
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
772
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
775
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
778
Assert.Equal(initial with {
Health
= null }, await ReadHostAsync());
843
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
846
Assert.Equal(initial with {
Health
= "no_resources" }, await ReadHostAsync());
849
Assert.Equal(initial with {
Health
= null }, await ReadHostAsync());
942
Assert.Equal(first with {
Health
= "warning", ProcessStartTimeUnixMilliseconds = 2000 }, second);
1097
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "healthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
1098
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "warning" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
1099
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "unhealthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
7 references to Health
Aspire.Cli.Tests (7)
Backchannel\TrayWatchStreamTests.cs (7)
755
Assert.Equal("warning", initial.
Health
);
840
Assert.Equal("no_resources", initial.
Health
);
888
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().AsTask().DefaultTimeout()).AppHosts!).
Health
);
893
Assert.Null(Assert.Single(message.AppHosts!).
Health
);
932
Assert.Equal("healthy", first.
Health
);
1007
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().DefaultTimeout()).AppHosts!).
Health
);
1016
Assert.Equal("warning", host.
Health
);