feat(hosts): driver diagnostics channel on /hosts, S7 negotiated PDU size first (#640)
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -272,6 +272,24 @@ public sealed class HostsDriverViewTests
|
||||
row.SkippedTags!.SkippedCount.ShouldBe(20);
|
||||
}
|
||||
|
||||
/// <summary>#640: diagnostics ride the snapshot onto the row, ordered by key; none renders nothing.</summary>
|
||||
[Fact]
|
||||
public void Diagnostics_reach_the_row_ordered_and_absent_diagnostics_yield_no_items()
|
||||
{
|
||||
var with = Snap("MAIN", "s7-a") with
|
||||
{
|
||||
Diagnostics = new Dictionary<string, string> { ["Z"] = "2", ["S7.NegotiatedPduSize"] = "480" },
|
||||
};
|
||||
var without = Snap("MAIN", "s7-b");
|
||||
|
||||
var rows = HostsDriverView.Build([with, without], nodes: null, instances: null).Single().Drivers;
|
||||
|
||||
var a = rows.Single(r => r.DriverInstanceId == "s7-a");
|
||||
a.DiagnosticItems.Select(k => k.Key).ShouldBe(["S7.NegotiatedPduSize", "Z"]);
|
||||
a.DiagnosticItems[0].Value.ShouldBe("480");
|
||||
rows.Single(r => r.DriverInstanceId == "s7-b").DiagnosticItems.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A truncated sample must SAY it is truncated. Without the note a capped list reads as the whole
|
||||
/// list, and an operator who fixes the twenty named tags believes the job is done.
|
||||
|
||||
Reference in New Issue
Block a user