NewClient creates a new client for the fixture's server.
(t *testing.T, token string)
| 261 | |
| 262 | // NewClient creates a new client for the fixture's server. |
| 263 | func (f *Fixture) NewClient(t *testing.T, token string) *client.Client { |
| 264 | c, err := client.New(f.ExternalURL(), token, "test") |
| 265 | require.NoError(t, err) |
| 266 | t.Cleanup(func() { require.NoError(t, c.Close()) }) |
| 267 | return c |
| 268 | } |
| 269 | |
| 270 | // ExternalURL returns the localhost URL of the fixture's server. |
| 271 | func (f *Fixture) ExternalURL() string { |