feat: expand mqtt varz monitoring with all Go-compatible fields
This commit is contained in:
@@ -271,6 +271,23 @@ public class MonitorTests : IAsyncLifetime
|
||||
response.StatusCode.ShouldBe(HttpStatusCode.OK);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Varz_includes_mqtt_section()
|
||||
{
|
||||
var response = await _http.GetAsync($"http://127.0.0.1:{_monitorPort}/varz");
|
||||
response.StatusCode.ShouldBe(HttpStatusCode.OK);
|
||||
|
||||
var varz = await response.Content.ReadFromJsonAsync<Varz>();
|
||||
varz.ShouldNotBeNull();
|
||||
varz.Mqtt.ShouldNotBeNull();
|
||||
varz.Mqtt.Host.ShouldBe("");
|
||||
varz.Mqtt.Port.ShouldBe(0);
|
||||
varz.Mqtt.NoAuthUser.ShouldBe("");
|
||||
varz.Mqtt.JsDomain.ShouldBe("");
|
||||
varz.Mqtt.AckWait.ShouldBe(0L);
|
||||
varz.Mqtt.MaxAckPending.ShouldBe((ushort)0);
|
||||
}
|
||||
|
||||
private static int GetFreePort()
|
||||
{
|
||||
using var sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
Reference in New Issue
Block a user