(t *testing.T, a *assertions.Assertion, ln net.Listener, code int)
| 158 | } |
| 159 | |
| 160 | func assertGetStatusCode(t *testing.T, a *assertions.Assertion, ln net.Listener, code int) { |
| 161 | t.Helper() |
| 162 | resp, err := http.Get(fmt.Sprintf("http://%v/healthz", ln.Addr())) |
| 163 | if !a.So(err, should.BeNil) { |
| 164 | t.FailNow() |
| 165 | } |
| 166 | defer resp.Body.Close() |
| 167 | defer io.Copy(io.Discard, resp.Body) // nolint:errcheck |
| 168 | a.So(resp.StatusCode, should.Equal, code) |
| 169 | } |
| 170 | |
| 171 | func TestHealthCheckerWithPassingCheck(t *testing.T) { |
| 172 | t.Parallel() |
no test coverage detected