MCPcopy
hub / github.com/ory/keto / healthReady

Function healthReady

internal/e2e/rest_client_test.go:203–212  ·  view source on GitHub ↗
(t require.TestingT, readURL string)

Source from the content-addressed store, hash-verified

201}
202
203func 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
214func waitUntilLive(t testing.TB, readURL string) {
215 require.EventuallyWithT(t, func(t *assert.CollectT) {

Callers 1

waitUntilLiveFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected