()
| 48 | } |
| 49 | |
| 50 | func (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 | |
| 70 | func (c *testClient) TestPoolPost(payload api.PoolPostRequest) ksuid.KSUID { |
| 71 | r, err := c.Connection.CreatePool(c.Context(), payload) |
no test coverage detected