fix(adminui): flip remaining ModbusTcp test seeds + doc comments to Modbus (review)

This commit is contained in:
Joseph Doherty
2026-06-16 19:51:56 -04:00
parent bec37848d5
commit a40c77de87
8 changed files with 11 additions and 11 deletions
@@ -21,7 +21,7 @@ public sealed class DriverInstance
/// <summary>Gets or sets the friendly name of this driver instance.</summary>
public required string Name { get; set; }
/// <summary>Galaxy | ModbusTcp | AbCip | AbLegacy | S7 | TwinCat | Focas | OpcUaClient</summary>
/// <summary>Galaxy | Modbus | AbCip | AbLegacy | S7 | TwinCat | Focas | OpcUaClient</summary>
public required string DriverType { get; set; }
/// <summary>Gets or sets a value indicating whether this driver instance is enabled.</summary>
@@ -17,7 +17,7 @@ public interface IDriver
/// <summary>Stable logical ID of this driver instance, sourced from the central config DB.</summary>
string DriverInstanceId { get; }
/// <summary>Driver type name (e.g. "Galaxy", "ModbusTcp", "AbCip"). Matches <c>DriverInstance.DriverType</c>.</summary>
/// <summary>Driver type name (e.g. "Galaxy", "Modbus", "AbCip"). Matches <c>DriverInstance.DriverType</c>.</summary>
string DriverType { get; }
/// <summary>Initialize the driver from its <c>DriverConfig</c> JSON; open connections; prepare for first use.</summary>
@@ -18,7 +18,7 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
/// </remarks>
public interface IDriverConfigEditor
{
/// <summary>Driver type name this editor handles (e.g. "Galaxy", "ModbusTcp").</summary>
/// <summary>Driver type name this editor handles (e.g. "Galaxy", "Modbus").</summary>
string DriverType { get; }
/// <summary>
@@ -52,7 +52,7 @@ public sealed class DraftValidatorTests
{
GenerationId = 1, ClusterId = "c-A",
Namespaces = [new Namespace { NamespaceId = "ns-1", ClusterId = "c-B", NamespaceUri = "urn:x", Kind = NamespaceKind.Equipment }],
DriverInstances = [new DriverInstance { DriverInstanceId = "d-1", ClusterId = "c-A", NamespaceId = "ns-1", Name = "drv", DriverType = "ModbusTcp", DriverConfig = "{}" }],
DriverInstances = [new DriverInstance { DriverInstanceId = "d-1", ClusterId = "c-A", NamespaceId = "ns-1", Name = "drv", DriverType = "Modbus", DriverConfig = "{}" }],
};
var errors = DraftValidator.Validate(draft);
@@ -67,7 +67,7 @@ public sealed class DraftValidatorTests
{
GenerationId = 1, ClusterId = "c-A",
Namespaces = [new Namespace { NamespaceId = "ns-1", ClusterId = "c-A", NamespaceUri = "urn:x", Kind = NamespaceKind.Equipment }],
DriverInstances = [new DriverInstance { DriverInstanceId = "d-1", ClusterId = "c-A", NamespaceId = "ns-1", Name = "drv", DriverType = "ModbusTcp", DriverConfig = "{}" }],
DriverInstances = [new DriverInstance { DriverInstanceId = "d-1", ClusterId = "c-A", NamespaceId = "ns-1", Name = "drv", DriverType = "Modbus", DriverConfig = "{}" }],
};
DraftValidator.Validate(draft).ShouldNotContain(e => e.Code == "BadCrossClusterNamespaceBinding");
@@ -277,7 +277,7 @@ public sealed class AdminOperationsActorTests : ControlPlaneActorTestBase
/// triggers <c>BadCrossClusterNamespaceBinding</c> and routes to the Rejected branch through
/// the actor — no coordinator dispatch, no Deployment row.
/// Seeded: Namespace in cluster "MAIN" + DriverInstance in cluster "SITE-A" referencing that
/// namespace. NamespaceKind.Equipment + DriverType "ModbusTcp" satisfies the compat rule so
/// namespace. NamespaceKind.Equipment + DriverType "Modbus" satisfies the compat rule so
/// only the cross-cluster rule fires.</summary>
[Fact]
public void StartDeployment_rejects_on_cross_cluster_namespace_binding()
@@ -300,7 +300,7 @@ public sealed class AdminOperationsActorTests : ControlPlaneActorTestBase
ClusterId = "SITE-A",
NamespaceId = nsId, // cross-cluster: drv is SITE-A, ns is MAIN
Name = "site-a-modbus",
DriverType = "ModbusTcp", // compatible with Equipment ns — no compat error
DriverType = "Modbus", // compatible with Equipment ns — no compat error
DriverConfig = "{}",
});
db.SaveChanges();
@@ -21,7 +21,7 @@ public sealed class DriverProbeRegistrationTests
// src/Server/.../Components/Pages/Clusters/Drivers/*DriverPage.razor.
private static readonly string[] AdminUiDriverTypeKeys =
[
"ModbusTcp",
"Modbus",
"AbCip",
"AbLegacy",
"S7",
@@ -58,7 +58,7 @@ public sealed class DriverTestConnectE2eTests
var configJson = $"{{\"Host\":\"{host}\",\"Port\":{port}}}";
var correlationId = Guid.NewGuid();
var msg = new TestDriverConnect("ModbusTcp", configJson, TimeoutSeconds: 10, correlationId);
var msg = new TestDriverConnect("Modbus", configJson, TimeoutSeconds: 10, correlationId);
var result = await client.AskAsync<TestDriverConnectResult>(msg, Ct);
@@ -89,7 +89,7 @@ public sealed class DriverTestConnectE2eTests
var configJson = $"{{\"Host\":\"{host}\",\"Port\":9999}}";
var correlationId = Guid.NewGuid();
var msg = new TestDriverConnect("ModbusTcp", configJson, TimeoutSeconds: 5, correlationId);
var msg = new TestDriverConnect("Modbus", configJson, TimeoutSeconds: 5, correlationId);
var result = await client.AskAsync<TestDriverConnectResult>(msg, Ct);
@@ -169,7 +169,7 @@ public sealed class MultiClusterScopingTests
ClusterId = clusterId,
NamespaceId = namespaceId,
Name = driverInstanceId,
DriverType = "ModbusTcp",
DriverType = "Modbus",
Enabled = true,
DriverConfig = "{}",
};