test: converge historian and runtime fixtures on SDK 2.0

This commit is contained in:
Joseph Doherty
2026-11-10 11:46:47 -05:00
parent 780f363f16
commit a76fca09f6
5 changed files with 42 additions and 37 deletions
@@ -28,7 +28,6 @@ using LocalizedText = Opc.Ua.LocalizedText;
using Proto = ZB.MOM.WW.MxGateway.Contracts.Proto;
using UaNodeId = Opc.Ua.NodeId;
using Variant = Opc.Ua.Variant;
using VariantCollection = Opc.Ua.VariantCollection;
namespace ZB.MOM.WW.OtOpcUa.Runtime.Tests.Drivers;
@@ -505,9 +504,9 @@ public sealed class NativeAlarmRestatementEndToEndTests : RuntimeActorTestBase
}
/// <summary>An upstream A&amp;C condition event, in the driver's select-clause order.</summary>
private static VariantCollection ConditionFields(bool active, bool acked) =>
private static Variant[] ConditionFields(bool active, bool acked) =>
[
new Variant(new byte[] { 1 }), // EventId
new Variant(Opc.Ua.ByteString.From(new byte[] { 1 })), // EventId
new Variant(new UaNodeId("TripAlarmType", 3)), // EventType
new Variant(UaNodeId.Parse(UpstreamSource)), // SourceNode
new Variant(new LocalizedText("tripped")), // Message
@@ -35,7 +35,7 @@ public sealed class ServiceLevelEndToEndTests : RuntimeActorTestBase
port => new OpcUaApplicationHost(
BuildOptions("PrimaryLeader", pkiRoot, port),
NullLogger<OpcUaApplicationHost>.Instance),
() => new StandardServer(), Ct);
() => new StandardServer(Opc.Ua.DefaultTelemetry.Create(_ => { })), Ct);
await using var host = started.Host;
var server = started.Server;
@@ -58,7 +58,7 @@ public sealed class ServiceLevelEndToEndTests : RuntimeActorTestBase
CorrelationId: CorrelationId.NewId()));
AwaitAssertion(() =>
server.CurrentInstance.ServerObject.ServiceLevel.Value.ShouldBe((byte)240));
server.CurrentInstance.ServerObject.ServiceLevel.ShouldNotBeNull().Value.ShouldBe((byte)240));
}
finally
{
@@ -77,7 +77,7 @@ public sealed class ServiceLevelEndToEndTests : RuntimeActorTestBase
port => new OpcUaApplicationHost(
BuildOptions("Secondary", pkiRoot, port),
NullLogger<OpcUaApplicationHost>.Instance),
() => new StandardServer(), Ct);
() => new StandardServer(Opc.Ua.DefaultTelemetry.Create(_ => { })), Ct);
await using var host = started.Host;
var server = started.Server;
@@ -100,7 +100,7 @@ public sealed class ServiceLevelEndToEndTests : RuntimeActorTestBase
CorrelationId: CorrelationId.NewId()));
AwaitAssertion(() =>
server.CurrentInstance.ServerObject.ServiceLevel.Value.ShouldBe((byte)100));
server.CurrentInstance.ServerObject.ServiceLevel.ShouldNotBeNull().Value.ShouldBe((byte)100));
}
finally
{