test(opcua-client): wire-level driver tests against the in-process server; retire scaffold headers (#622)

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-08 07:07:55 -04:00
parent b007d450d8
commit 2b8b5fbdb2
8 changed files with 326 additions and 11 deletions
@@ -138,6 +138,24 @@ internal sealed class ServerEventRig : IAsyncDisposable
ScriptedAlarmId, EqA, "hi", "AlarmCondition", 500, AddressSpaceRealm.Uns, isNative: false);
}
/// <summary>
/// Adds a raw value variable under <see cref="RawDeviceFolder"/> (the folder is ensured), for tests that
/// drive a real client against plain values rather than alarm conditions. Additive to the alarm helpers.
/// </summary>
public string EnsureRawVariable(string name, string dataType, bool writable)
{
Sink.EnsureFolder(RawDeviceFolder, parentNodeId: null, displayName: "dev1", realm: AddressSpaceRealm.Raw);
var id = $"{RawDeviceFolder}/{name}";
Sink.EnsureVariable(id, RawDeviceFolder, name, dataType, writable, AddressSpaceRealm.Raw);
return id;
}
/// <summary>The server-stable <c>nsu=</c> form of a raw-realm string NodeId.</summary>
public static string RawNsu(string id) => $"nsu={V3NodeIds.RawNamespaceUri};s={id}";
/// <summary>The API-key credential <see cref="KeyPresentingAuthenticator"/> admits (username is always <c>apikey</c>).</summary>
public static string KeyPassword => $"otua_{KeyId}_secret";
public void EnsureEquipment()
{
Sink.EnsureFolder(EqA, parentNodeId: null, displayName: "A", realm: AddressSpaceRealm.Uns);