feat(cli): historyread --held-marker-file for hand-paged reads
This commit is contained in:
@@ -73,13 +73,16 @@ public class HistoryReadPagedCommandTests
|
||||
{
|
||||
var fake = new FakeOpcUaClientService();
|
||||
fake.HistoryPages.Enqueue(new HistoryPage(StatusCodes.Good, [Value(1, 0)], [5]));
|
||||
var held = Path.Combine(Path.GetTempPath(), "cli-held-" + Guid.NewGuid().ToString("N"));
|
||||
using var console = TestConsoleHelper.CreateConsole();
|
||||
var command = new HistoryReadCommand(new FakeOpcUaClientServiceFactory(fake))
|
||||
{
|
||||
Url = "opc.tcp://localhost:4840", NodeId = "ns=3;s=p1.x", PageSize = 1,
|
||||
AbandonAfterPage = release ? 0 : 1, ReleaseAfterPage = release ? 1 : 0,
|
||||
AbandonAfterPage = release ? 0 : 1, ReleaseAfterPage = release ? 1 : 0, HeldMarkerFile = held,
|
||||
};
|
||||
await command.ExecuteAsync(console);
|
||||
File.Exists(held).ShouldBeTrue("the held marker is written at the abandon / release point");
|
||||
File.Delete(held);
|
||||
var output = TestConsoleHelper.GetOutput(console);
|
||||
if (release)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user