feat: add client kind command matrix parity
This commit is contained in:
14
tests/NATS.Server.Tests/ClientKindCommandMatrixTests.cs
Normal file
14
tests/NATS.Server.Tests/ClientKindCommandMatrixTests.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user