feat(batch6-task7): port t2 leaf route websocket tls tests
This commit is contained in:
@@ -6,6 +6,34 @@ namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
|
||||
|
||||
public sealed partial class WebSocketHandlerTests
|
||||
{
|
||||
[Fact] // T:3109
|
||||
public void WSHandshakeTimeout_ShouldSucceed()
|
||||
{
|
||||
var options = new ServerOptions();
|
||||
var errors = new List<Exception>();
|
||||
var warnings = new List<Exception>();
|
||||
|
||||
var parseError = ServerOptions.ParseWebsocket(
|
||||
new Dictionary<string, object?>
|
||||
{
|
||||
["handshake_timeout"] = "1ms",
|
||||
["tls"] = new Dictionary<string, object?>
|
||||
{
|
||||
["verify_and_map"] = true,
|
||||
},
|
||||
},
|
||||
options,
|
||||
errors,
|
||||
warnings);
|
||||
|
||||
parseError.ShouldBeNull();
|
||||
errors.ShouldBeEmpty();
|
||||
options.Websocket.HandshakeTimeout.ShouldBe(TimeSpan.FromMilliseconds(1));
|
||||
options.Websocket.TlsConfig.ShouldNotBeNull();
|
||||
options.Websocket.TlsMap.ShouldBeTrue();
|
||||
options.Websocket.TlsConfig!.ClientCertificateRequired.ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact] // T:3105
|
||||
public void WSPubSub_ShouldSucceed()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user