MustNewServer is a test utility function to initialize a new server with the given app
(t *testing.T, a *app.App)
| 26 | // MustNewServer is a test utility function to initialize a new server |
| 27 | // with the given app |
| 28 | func MustNewServer(t *testing.T, a *app.App) *httptest.Server { |
| 29 | server, err := NewServer(a) |
| 30 | if err != nil { |
| 31 | t.Fatal(errors.Wrap(err, "initializing router")) |
| 32 | } |
| 33 | |
| 34 | return server |
| 35 | } |
| 36 | |
| 37 | func NewServer(a *app.App) (*httptest.Server, error) { |
| 38 | ctl := New(a) |