refactor(historian): remove named-pipe transport
This commit is contained in:
+3
-9
@@ -55,10 +55,8 @@ public sealed class TcpConnectFactoryTests
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(200), cts.Token);
|
||||
}, cts.Token);
|
||||
|
||||
var opts = new WonderwareHistorianClientOptions("pipe", "secret")
|
||||
var opts = new WonderwareHistorianClientOptions("127.0.0.1", boundPort, "secret")
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = boundPort,
|
||||
UseTls = false,
|
||||
};
|
||||
|
||||
@@ -94,10 +92,8 @@ public sealed class TcpConnectFactoryTests
|
||||
ssl.Dispose();
|
||||
}, cts.Token);
|
||||
|
||||
var opts = new WonderwareHistorianClientOptions("pipe", "secret")
|
||||
var opts = new WonderwareHistorianClientOptions("127.0.0.1", boundPort, "secret")
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = boundPort,
|
||||
UseTls = true,
|
||||
ServerCertThumbprint = cert.GetCertHashString(),
|
||||
};
|
||||
@@ -137,10 +133,8 @@ public sealed class TcpConnectFactoryTests
|
||||
}
|
||||
}, cts.Token);
|
||||
|
||||
var opts = new WonderwareHistorianClientOptions("pipe", "secret")
|
||||
var opts = new WonderwareHistorianClientOptions("127.0.0.1", boundPort, "secret")
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = boundPort,
|
||||
UseTls = true,
|
||||
ServerCertThumbprint = "00112233445566778899AABBCCDDEEFF00112233", // bogus
|
||||
};
|
||||
|
||||
+4
-6
@@ -11,10 +11,8 @@ public sealed class WonderwareHistorianClientOptionsTests
|
||||
[Fact]
|
||||
public void TcpTlsFields_AreStoredCorrectly_WhenExplicitlySet()
|
||||
{
|
||||
var opts = new WonderwareHistorianClientOptions("pipe", "secret")
|
||||
var opts = new WonderwareHistorianClientOptions("h", 32569, "secret")
|
||||
{
|
||||
Host = "h",
|
||||
Port = 32569,
|
||||
UseTls = true,
|
||||
ServerCertThumbprint = "AB"
|
||||
};
|
||||
@@ -28,10 +26,10 @@ public sealed class WonderwareHistorianClientOptionsTests
|
||||
[Fact]
|
||||
public void TcpTlsFields_HaveCorrectDefaults_WhenNotSet()
|
||||
{
|
||||
var opts = new WonderwareHistorianClientOptions("pipe", "secret");
|
||||
var opts = new WonderwareHistorianClientOptions("host", 32569, "secret");
|
||||
|
||||
opts.Host.ShouldBeNull();
|
||||
opts.Port.ShouldBe(0);
|
||||
opts.Host.ShouldBe("host");
|
||||
opts.Port.ShouldBe(32569);
|
||||
opts.UseTls.ShouldBeFalse();
|
||||
opts.ServerCertThumbprint.ShouldBeNull();
|
||||
}
|
||||
|
||||
+6
-9
@@ -22,14 +22,13 @@ public sealed class WonderwareHistorianClientTests
|
||||
private const string Secret = "test-secret-123";
|
||||
|
||||
private static WonderwareHistorianClientOptions OptsFor(FakeSidecarServer server) => new(
|
||||
PipeName: "",
|
||||
Host: "127.0.0.1",
|
||||
Port: server.BoundPort,
|
||||
SharedSecret: Secret,
|
||||
PeerName: "test",
|
||||
ConnectTimeout: TimeSpan.FromSeconds(2),
|
||||
CallTimeout: TimeSpan.FromSeconds(2))
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = server.BoundPort,
|
||||
UseTls = false,
|
||||
};
|
||||
|
||||
@@ -445,14 +444,13 @@ public sealed class WonderwareHistorianClientTests
|
||||
await server.StartAsync();
|
||||
|
||||
var opts = new WonderwareHistorianClientOptions(
|
||||
PipeName: "",
|
||||
Host: "127.0.0.1",
|
||||
Port: server.BoundPort,
|
||||
SharedSecret: Secret,
|
||||
PeerName: "test",
|
||||
ConnectTimeout: TimeSpan.FromSeconds(2),
|
||||
CallTimeout: TimeSpan.FromMilliseconds(500)) // short timeout for test speed
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = server.BoundPort,
|
||||
UseTls = false,
|
||||
};
|
||||
|
||||
@@ -661,13 +659,12 @@ public sealed class WonderwareHistorianClientTests
|
||||
|
||||
// 3. Construct the client via the PUBLIC ctor (no ForTests factory).
|
||||
var opts = new WonderwareHistorianClientOptions(
|
||||
PipeName: "ignored-pipe",
|
||||
Host: "127.0.0.1",
|
||||
Port: boundPort,
|
||||
SharedSecret: Secret,
|
||||
ConnectTimeout: TimeSpan.FromSeconds(5),
|
||||
CallTimeout: TimeSpan.FromSeconds(5))
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = boundPort,
|
||||
UseTls = false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user