feat(batch9): implement f1 auth and dirstore foundations
This commit is contained in:
@@ -22,6 +22,7 @@ using NSubstitute.ExceptionExtensions;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
using ZB.MOM.NatsNet.Server.Auth;
|
||||
using ZB.MOM.NatsNet.Server.Internal;
|
||||
|
||||
namespace ZB.MOM.NatsNet.Server.Tests;
|
||||
|
||||
@@ -218,6 +219,21 @@ public sealed class ServerTests
|
||||
err.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MatchesPinnedCert_NullPinnedSet_ReturnsTrue()
|
||||
{
|
||||
var client = new ClientConnection(ClientKind.Client, nc: new MemoryStream());
|
||||
client.MatchesPinnedCert(null).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MatchesPinnedCert_NoTlsCertificate_ReturnsFalse()
|
||||
{
|
||||
var client = new ClientConnection(ClientKind.Client, nc: new MemoryStream());
|
||||
var pinned = new PinnedCertSet([new string('a', 64)]);
|
||||
client.MatchesPinnedCert(pinned).ShouldBeFalse();
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// GetServerProto
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user