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

Function TestServerSystemInfo

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

Source from the content-addressed store, hash-verified

104}
105
106func TestServerSystemInfo(t *testing.T) {
107 srv, cleanup := setupTestServer(t)
108 defer cleanup()
109
110 req := httptest.NewRequest(http.MethodGet, "/v1/system/info", nil)
111 w := httptest.NewRecorder()
112
113 srv.Router().ServeHTTP(w, req)
114
115 assert.Equal(t, http.StatusOK, w.Code)
116 assert.Contains(t, w.Body.String(), "version")
117 assert.Contains(t, w.Body.String(), "go_version")
118}
119
120func TestServerPoolStats(t *testing.T) {
121 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