feat: add client kind command matrix parity

This commit is contained in:
Joseph Doherty
2026-02-23 05:41:42 -05:00
parent 1ebf283a8c
commit d9f157d9e4
5 changed files with 72 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
using NATS.Server.Protocol;
namespace NATS.Server.Tests;
public class ClientKindCommandMatrixTests
{
[Fact]
public void Router_only_commands_are_rejected_for_client_kind()
{
var matrix = new ClientCommandMatrix();
matrix.IsAllowed(ClientKind.Client, "RS+").ShouldBeFalse();
matrix.IsAllowed(ClientKind.Router, "RS+").ShouldBeTrue();
}
}