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

Function TestBuildInterfaceStats

pkg/stats/interface_counters_test.go:72–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestBuildInterfaceStats(t *testing.T) {
73 stats := BuildInterfaceStats("wg0", "wg0", 15, 9)
74 if len(stats) != 2 {
75 t.Fatalf("expected 2 stats, got %d", len(stats))
76 }
77
78 if stats[0].GetLink() != "wg0" || stats[1].GetLink() != "wg0" {
79 t.Fatalf("expected link=wg0 for all entries")
80 }
81}

Callers

nothing calls this directly

Calls 2

BuildInterfaceStatsFunction · 0.85
GetLinkMethod · 0.45

Tested by

no test coverage detected