(t require.TestingT, readURL string)
| 201 | } |
| 202 | |
| 203 | func healthReady(t require.TestingT, readURL string) int { |
| 204 | req, err := http.NewRequest("GET", readURL+healthx.ReadyCheckPath, nil) |
| 205 | require.NoError(t, err) |
| 206 | resp, err := http.DefaultClient.Do(req) |
| 207 | if err != nil { |
| 208 | return 0 |
| 209 | } |
| 210 | defer func() { _ = resp.Body.Close() }() |
| 211 | return resp.StatusCode |
| 212 | } |
| 213 | |
| 214 | func waitUntilLive(t testing.TB, readURL string) { |
| 215 | require.EventuallyWithT(t, func(t *assert.CollectT) { |