mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Add test for Connz Total connections
This commit is contained in:
@@ -502,6 +502,10 @@ func TestConnzWithOffsetAndLimit(t *testing.T) {
|
||||
t.Fatalf("Expected NumConns to be 1, got %v\n", c.NumConns)
|
||||
}
|
||||
|
||||
if c.Total != 2 {
|
||||
t.Fatalf("Expected Total to be at least 2, got %v", c.Total)
|
||||
}
|
||||
|
||||
resp, err = http.Get(url + "connz?offset=2&limit=1")
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error: Got %v\n", err)
|
||||
@@ -535,6 +539,10 @@ func TestConnzWithOffsetAndLimit(t *testing.T) {
|
||||
if c.NumConns != 0 {
|
||||
t.Fatalf("Expected NumConns to be 0, got %v\n", c.NumConns)
|
||||
}
|
||||
|
||||
if c.Total != 2 {
|
||||
t.Fatalf("Expected Total to be 2, got %v", c.Total)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConnzDefaultSorted(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user