Add test for Connz Total connections

This commit is contained in:
Ivan Kozlovic
2016-04-26 18:00:58 -06:00
parent 062172926f
commit 19ea9c5a60

View File

@@ -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) {