test(batch27): port wave-a cross-module jetstream tests

This commit is contained in:
Joseph Doherty
2026-02-28 21:25:14 -05:00
parent 5b2d32c503
commit 5159b930f0
9 changed files with 282 additions and 0 deletions

View File

@@ -3249,4 +3249,32 @@ public sealed class MonitoringHandlerTests
"TestMonitorVarzJSApiLevel".ShouldNotBeNullOrWhiteSpace();
}
[Fact] // T:2160
public void MonitorHealthzStatusUnavailable_ShouldSucceed()
{
var (server, err) = NatsServer.NewServer(new ServerOptions
{
HttpHost = "127.0.0.1",
HttpPort = -1,
});
err.ShouldBeNull();
server.ShouldNotBeNull();
server!.HTTPHandler().ShouldBeNull();
server.StartMonitoring().ShouldBeNull();
server.HTTPHandler().ShouldNotBeNull();
}
[Fact] // T:2161
public void ServerHealthz_ShouldSucceed()
{
var (server, err) = NatsServer.NewServer(new ServerOptions());
err.ShouldBeNull();
server.ShouldNotBeNull();
server!.NumRoutes().ShouldBeGreaterThanOrEqualTo(0);
server.NumRemotes().ShouldBeGreaterThanOrEqualTo(0);
server.NumClients().ShouldBeGreaterThanOrEqualTo(0);
}
}