MCPcopy Index your code
hub / github.com/coder/coder / AssertEventuallyGetsError

Method AssertEventuallyGetsError

tailnet/test/peer.go:295–308  ·  view source on GitHub ↗
(match string)

Source from the content-addressed store, hash-verified

293}
294
295func (p *Peer) AssertEventuallyGetsError(match string) {
296 p.t.Helper()
297 for {
298 err := p.readOneResp()
299 if xerrors.Is(err, errResponsesClosed) {
300 p.t.Error("closed before target error")
301 return
302 }
303
304 if err != nil && assert.ErrorContains(p.t, err, match) {
305 return
306 }
307 }
308}
309
310// AssertNeverUpdateKind asserts that we have not received
311// any updates on the provided peer for the provided kind.

Callers 1

Calls 4

readOneRespMethod · 0.95
HelperMethod · 0.65
IsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected