Replace Probe with Agent across node runtime, Fleet contracts, backend state, API and storage. Report incoming sessions and outgoing link health through each Agent uplink, and retain directed link controls and retry. Update protocol fixtures and end-to-end coverage for the unified model; accept requested cancellation during the Fleet timeout test cleanup.
18 lines
634 B
C#
18 lines
634 B
C#
using System.Text.Json;
|
|
|
|
namespace MoShiro.Protocol.Tests;
|
|
|
|
public sealed class NodeRuntimeStatusTests
|
|
{
|
|
[Fact]
|
|
public void HeartbeatStatus_UsesStableSnakeCaseEnumValues()
|
|
{
|
|
var heartbeat = new NodeHeartbeatExtra { RuntimeStatus = NodeRuntimeStatus.Idle };
|
|
string json = JsonSerializer.Serialize(heartbeat, MoShiroJsonContext.Default.NodeHeartbeatExtra);
|
|
|
|
Assert.Contains("\"runtime_status\":\"idle\"", json, StringComparison.Ordinal);
|
|
Assert.Equal(NodeRuntimeStatus.Idle,
|
|
JsonSerializer.Deserialize(json, MoShiroJsonContext.Default.NodeHeartbeatExtra)!.RuntimeStatus);
|
|
}
|
|
}
|