| 210 | } |
| 211 | |
| 212 | func TestREST_GetOutboundsStats(t *testing.T) { |
| 213 | var stats common.StatResponse |
| 214 | if err := sharedTestCtx.createAuthenticatedRequest("GET", "/stats", &common.StatRequest{Reset_: true, Type: common.StatType_Outbounds}, &stats); err != nil { |
| 215 | t.Fatalf("Failed to get outbound stats: %v", err) |
| 216 | } |
| 217 | |
| 218 | for _, stat := range stats.GetStats() { |
| 219 | log.Printf("Outbound Stat - Name: %s, Traffic: %d, Type: %s, Link: %s", |
| 220 | stat.GetName(), stat.GetValue(), stat.GetType(), stat.GetLink()) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | func TestREST_GetInboundsStats(t *testing.T) { |
| 225 | var stats common.StatResponse |