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

Method AssertNeverHasDERPs

tailnet/test/peer.go:181–203  ·  view source on GitHub ↗
(ctx context.Context, other uuid.UUID, expected ...int32)

Source from the content-addressed store, hash-verified

179}
180
181func (p *Peer) AssertNeverHasDERPs(ctx context.Context, other uuid.UUID, expected ...int32) {
182 p.t.Helper()
183 for {
184 select {
185 case <-ctx.Done():
186 return
187 case resp, ok := <-p.resps:
188 if !ok {
189 p.t.Errorf("response channel closed")
190 }
191 if !assert.NoError(p.t, p.handleResp(resp)) {
192 return
193 }
194 derp, ok := p.peers[other]
195 if !ok {
196 continue
197 }
198 if !assert.NotContains(p.t, expected, derp) {
199 return
200 }
201 }
202 }
203}
204
205func (p *Peer) AssertEventuallyDisconnected(other uuid.UUID) {
206 p.t.Helper()

Calls 4

handleRespMethod · 0.95
HelperMethod · 0.65
DoneMethod · 0.45
ErrorfMethod · 0.45

Tested by 1