Remove throwaway live-stats probe test (rehearsal scaffolding)
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
package agent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Throwaway live probe (B5 rehearsal): query the rehearsal core's
|
|
||||||
// v2ray_api stats service with the production client code.
|
|
||||||
func TestZZProbeLiveStats(t *testing.T) {
|
|
||||||
c := newSingboxStatsClient(func() string { return "probe" })
|
|
||||||
addr := os.Getenv("ZZ_STATS_ADDR")
|
|
||||||
if addr == "" {
|
|
||||||
addr = "127.0.0.1:10086"
|
|
||||||
}
|
|
||||||
c.SetAddr(addr)
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second)
|
|
||||||
defer cancel()
|
|
||||||
entries, err := c.queryStats(ctx)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("queryStats: %v", err)
|
|
||||||
}
|
|
||||||
t.Logf("entries: %d", len(entries))
|
|
||||||
for _, e := range entries {
|
|
||||||
t.Logf(" %s = %d", e.Name, e.Value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user