MCPcopy
hub / github.com/CodisLabs/codis / TestStats

Function TestStats

pkg/proxy/proxy_test.go:47–60  ·  view source on GitHub ↗
(x *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestStats(x *testing.T) {
48 s, addr := openProxy()
49 defer s.Close()
50
51 var c = NewApiClient(addr)
52
53 c.SetXAuth(config.ProductName, config.ProductAuth, "")
54 _, err1 := c.StatsSimple()
55 assert.Must(err1 != nil)
56
57 c.SetXAuth(config.ProductName, config.ProductAuth, s.Model().Token)
58 _, err2 := c.Stats(0)
59 assert.MustNoError(err2)
60}
61
62func verifySlots(c *ApiClient, expect map[int]*models.Slot) {
63 slots, err := c.Slots()

Callers

nothing calls this directly

Calls 7

StatsSimpleMethod · 0.80
openProxyFunction · 0.70
NewApiClientFunction · 0.70
CloseMethod · 0.65
SetXAuthMethod · 0.45
ModelMethod · 0.45
StatsMethod · 0.45

Tested by

no test coverage detected