MCPcopy Create free account
hub / github.com/PasarGuard/node / TestREST_GetInboundsStats

Function TestREST_GetInboundsStats

controller/rest/rest_test.go:224–234  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

222}
223
224func TestREST_GetInboundsStats(t *testing.T) {
225 var stats common.StatResponse
226 if err := sharedTestCtx.createAuthenticatedRequest("GET", "/stats", &common.StatRequest{Reset_: true, Type: common.StatType_Inbounds}, &stats); err != nil {
227 t.Fatalf("Failed to get inbounds stats: %v", err)
228 }
229
230 for _, stat := range stats.GetStats() {
231 log.Printf("Inbound Stat - Name: %s, Traffic: %d, Type: %s, Link: %s",
232 stat.GetName(), stat.GetValue(), stat.GetType(), stat.GetLink())
233 }
234}
235
236func TestREST_GetUsersStats(t *testing.T) {
237 var stats common.StatResponse

Callers

nothing calls this directly

Calls 5

GetStatsMethod · 0.95
GetNameMethod · 0.45
GetValueMethod · 0.45
GetTypeMethod · 0.45
GetLinkMethod · 0.45

Tested by

no test coverage detected