test(v3): migrate 6 driver IntegrationTests to RawTags API
Replace pre-declared options.Tags (typed <Driver>TagDefinition lists) with options.RawTags (IReadOnlyList<RawTagEntry>) across all 6 Docker-gated driver integration suites so they COMPILE against the v3 driver API. Each project gets a local <Driver>RawTags helper mirroring the unit-test project's helper: it serialises a typed def back to its TagConfig blob via the driver's <Driver>TagDefinitionFactory.ToTagConfig and packages it as a RawTagEntry (RawPath = def.Name; DeviceName = def.DeviceHostAddress for the multi-device drivers AbCip/AbLegacy/TwinCAT/FOCAS). Test intent (addresses, data types, device routing, assertions) is unchanged — only the tag-authoring/config-delivery shape was migrated. Docker-gated: these still skip at runtime without fixtures; COMPILE is the gate.
This commit is contained in:
+14
-25
@@ -246,14 +246,12 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = [new TwinCATDeviceOptions($"ads://{sim.TargetNetId}:{sim.AmsPort}", "XAR-VM")],
|
||||
Tags =
|
||||
[
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "Primitive",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
SymbolPath: symbolPath,
|
||||
DataType: type),
|
||||
],
|
||||
DataType: type)),
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
Probe = new TwinCATProbeOptions { Enabled = false },
|
||||
};
|
||||
@@ -307,8 +305,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = [new TwinCATDeviceOptions($"ads://{sim.TargetNetId}:{sim.AmsPort}", "XAR-VM")],
|
||||
Tags =
|
||||
[
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "WordBit3",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
@@ -318,8 +315,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
Name: "WordBit4",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
SymbolPath: "GVL_Primitives.vWord.4",
|
||||
DataType: TwinCATDataType.Bool),
|
||||
],
|
||||
DataType: TwinCATDataType.Bool)),
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
Probe = new TwinCATProbeOptions { Enabled = false },
|
||||
};
|
||||
@@ -345,8 +341,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = [new TwinCATDeviceOptions($"ads://{sim.TargetNetId}:{sim.AmsPort}", "XAR-VM")],
|
||||
Tags =
|
||||
[
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "MotorTemp",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
@@ -356,8 +351,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
Name: "MotorRunning",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
SymbolPath: "GVL_Plant.Line1.Stations[1].Axes[1].Motor.Running",
|
||||
DataType: TwinCATDataType.Bool),
|
||||
],
|
||||
DataType: TwinCATDataType.Bool)),
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
Probe = new TwinCATProbeOptions { Enabled = false },
|
||||
};
|
||||
@@ -386,8 +380,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = [new TwinCATDeviceOptions($"ads://{sim.TargetNetId}:{sim.AmsPort}", "XAR-VM")],
|
||||
Tags =
|
||||
[
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "NonexistentSymbol",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
@@ -398,8 +391,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
SymbolPath: "GVL_Fixture.nCounter",
|
||||
DataType: TwinCATDataType.DInt,
|
||||
Writable: false),
|
||||
],
|
||||
Writable: false)),
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
Probe = new TwinCATProbeOptions { Enabled = false },
|
||||
};
|
||||
@@ -442,8 +434,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
new TwinCATDeviceOptions(realHost, "Real-VM"),
|
||||
new TwinCATDeviceOptions(ghostHost, "Ghost-VM"),
|
||||
],
|
||||
Tags =
|
||||
[
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "RealCounter",
|
||||
DeviceHostAddress: realHost,
|
||||
@@ -453,8 +444,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
Name: "GhostCounter",
|
||||
DeviceHostAddress: ghostHost,
|
||||
SymbolPath: "GVL_Fixture.nCounter",
|
||||
DataType: TwinCATDataType.DInt),
|
||||
],
|
||||
DataType: TwinCATDataType.DInt)),
|
||||
// Shorter timeout so the bogus device fails fast rather than dragging the whole
|
||||
// test; the healthy read shouldn't be slowed down by a peer timeout.
|
||||
Timeout = TimeSpan.FromSeconds(2),
|
||||
@@ -488,7 +478,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = [new TwinCATDeviceOptions($"ads://{sim.TargetNetId}:{sim.AmsPort}", "XAR-VM")],
|
||||
Tags = [],
|
||||
RawTags = [],
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
Probe = new TwinCATProbeOptions
|
||||
{
|
||||
@@ -532,7 +522,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
var options = new TwinCATDriverOptions
|
||||
{
|
||||
Devices = baseOptions.Devices,
|
||||
Tags = baseOptions.Tags,
|
||||
RawTags = baseOptions.RawTags,
|
||||
UseNativeNotifications = baseOptions.UseNativeNotifications,
|
||||
Timeout = baseOptions.Timeout,
|
||||
Probe = baseOptions.Probe,
|
||||
@@ -565,7 +555,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
HostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
DeviceName: "XAR-VM"),
|
||||
],
|
||||
Tags = [
|
||||
RawTags = TwinCATRawTags.Entries(
|
||||
new TwinCATTagDefinition(
|
||||
Name: "Counter",
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
@@ -582,8 +572,7 @@ public sealed class TwinCAT3SmokeTests(TwinCATXarFixture sim)
|
||||
DeviceHostAddress: $"ads://{sim.TargetNetId}:{sim.AmsPort}",
|
||||
SymbolPath: "GVL_Arrays.aReal1D[5]",
|
||||
DataType: TwinCATDataType.Real,
|
||||
Writable: true),
|
||||
],
|
||||
Writable: true)),
|
||||
UseNativeNotifications = true,
|
||||
Timeout = TimeSpan.FromSeconds(5),
|
||||
// Disable the probe loop — the smoke tests run their own reads; a background
|
||||
|
||||
Reference in New Issue
Block a user