(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData))
| 814 | } |
| 815 | |
| 816 | func checkServerStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { |
| 817 | if len(got) != len(checkFuncs) { |
| 818 | for i, g := range got { |
| 819 | t.Errorf(" - %v, %T", i, g.s) |
| 820 | } |
| 821 | t.Fatalf("got %v stats, want %v stats", len(got), len(checkFuncs)) |
| 822 | } |
| 823 | |
| 824 | for i, f := range checkFuncs { |
| 825 | f(t, got[i], expect) |
| 826 | } |
| 827 | } |
| 828 | |
| 829 | func testServerStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { |
| 830 | h := &statshandler{} |
no test coverage detected