MCPcopy Create free account
hub / github.com/astercloud/aster / TestServerPoolStats

Function TestServerPoolStats

server/server_test.go:120–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

118}
119
120func TestServerPoolStats(t *testing.T) {
121 srv, cleanup := setupTestServer(t)
122 defer cleanup()
123
124 req := httptest.NewRequest(http.MethodGet, "/v1/pool/stats", nil)
125 w := httptest.NewRecorder()
126
127 srv.Router().ServeHTTP(w, req)
128
129 assert.Equal(t, http.StatusOK, w.Code)
130 assert.Contains(t, w.Body.String(), "total_agents")
131}
132
133func TestServerRoomsList(t *testing.T) {
134 srv, cleanup := setupTestServer(t)

Callers

nothing calls this directly

Calls 4

setupTestServerFunction · 0.85
ServeHTTPMethod · 0.45
RouterMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected