Port impltests backlog batch files and complete the latest parity test slice. Update tracker/report databases so verified status matches the passing batch evidence.

This commit is contained in:
Joseph Doherty
2026-02-27 12:42:31 -05:00
parent a8c09a271f
commit fe3fd7c74d
37 changed files with 21248 additions and 4 deletions

View File

@@ -0,0 +1,45 @@
using Shouldly;
using ZB.MOM.NatsNet.Server;
using ZB.MOM.NatsNet.Server.Auth;
using ZB.MOM.NatsNet.Server.Internal;
namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
public sealed class AuthHandlerTests
{
[Fact] // T:149
public void NoAuthUser_ShouldSucceed()
{
var opts = new ServerOptions
{
Users = [new User { Username = "alice" }],
};
AuthHandler.ValidateNoAuthUser(opts, "alice").ShouldBeNull();
}
[Fact] // T:150
public void NoAuthUserNkey_ShouldSucceed()
{
var opts = new ServerOptions
{
Nkeys = [new NkeyUser { Nkey = "NKEY1" }],
};
AuthHandler.ValidateNoAuthUser(opts, "NKEY1").ShouldBeNull();
}
[Fact] // T:152
public void NoAuthUserNoConnectProto_ShouldSucceed()
{
var opts = new ServerOptions
{
Users = [new User { Username = "alice" }],
};
var err = AuthHandler.ValidateNoAuthUser(opts, "bob");
err.ShouldNotBeNull();
err!.Message.ShouldContain("not present as user or nkey");
}
}