test(batch7): implement t3 cross-cutting mapped tests
This commit is contained in:
@@ -1121,6 +1121,43 @@ public sealed class JwtProcessorTests
|
||||
"TestJWTAccountNATSResolverWrongCreds".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:1893
|
||||
public void DefaultSentinelUser_ShouldSucceed()
|
||||
{
|
||||
var options = new ServerOptions();
|
||||
var errors = new List<Exception>();
|
||||
var warnings = new List<Exception>();
|
||||
|
||||
options.ProcessConfigFileLine("default_sentinel", "bearer.default.sentinel", errors, warnings);
|
||||
errors.ShouldBeEmpty();
|
||||
warnings.ShouldBeEmpty();
|
||||
options.DefaultSentinel.ShouldBe("bearer.default.sentinel");
|
||||
|
||||
options.ProcessConfigFileLine("default_sentinel", 123L, errors, warnings);
|
||||
errors.Count.ShouldBe(1);
|
||||
errors[0].Message.ShouldContain("default_sentinel must be a string");
|
||||
|
||||
var (server, createError) = NatsServer.NewServer(new ServerOptions
|
||||
{
|
||||
NoLog = true,
|
||||
NoSigs = true,
|
||||
});
|
||||
createError.ShouldBeNull();
|
||||
server.ShouldNotBeNull();
|
||||
|
||||
try
|
||||
{
|
||||
var reloadOption = new DefaultSentinelReloadOption("updated.sentinel");
|
||||
|
||||
reloadOption.IsAuthChange().ShouldBeFalse();
|
||||
Should.NotThrow(() => reloadOption.Apply(server!));
|
||||
}
|
||||
finally
|
||||
{
|
||||
server!.Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact] // T:1895
|
||||
public void JWTJetStreamClientsExcludedForMaxConnsUpdate_ShouldSucceed()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user