MCPcopy Create free account
hub / github.com/brimdata/super / TestPoolList

Method TestPoolList

service/client_test.go:50–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50func (c *testClient) TestPoolList() []pools.Config {
51 r, err := c.Query(c.Context(), srcfiles.Plain("from :pools"))
52 require.NoError(c, err)
53 defer r.Body.Close()
54 var confs []pools.Config
55 zr := bsupio.NewReader(super.NewContext(), r.Body)
56 defer zr.Close()
57 for {
58 rec, err := zr.Read()
59 require.NoError(c, err)
60 if rec == nil {
61 return confs
62 }
63 var pool pools.Config
64 err = sup.UnmarshalBSUP(*rec, &pool)
65 require.NoError(c, err)
66 confs = append(confs, pool)
67 }
68}
69
70func (c *testClient) TestPoolPost(payload api.PoolPostRequest) ksuid.KSUID {
71 r, err := c.Connection.CreatePool(c.Context(), payload)

Callers 1

TestPoolRemoteFunction · 0.80

Calls 9

CloseMethod · 0.95
ReadMethod · 0.95
PlainFunction · 0.92
NewReaderFunction · 0.92
NewContextFunction · 0.92
UnmarshalBSUPFunction · 0.92
ContextMethod · 0.80
QueryMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected