MCPcopy Create free account
hub / github.com/coder/coder / recvData

Function recvData

enterprise/derpmesh/derpmesh_test.go:241–256  ·  view source on GitHub ↗
(t *testing.T, client *derphttp.Client)

Source from the content-addressed store, hash-verified

239}
240
241func recvData(t *testing.T, client *derphttp.Client) []byte {
242 for {
243 msg, err := client.Recv()
244 if errors.Is(err, io.EOF) {
245 return nil
246 }
247 assert.NoError(t, err)
248 t.Logf("derp: %T", msg)
249 switch msg := msg.(type) {
250 case derp.ReceivedPacket:
251 return msg.Data
252 default:
253 // Drop all others!
254 }
255 }
256}
257
258func startDERP(t *testing.T, tlsConfig *tls.Config) (*derp.Server, string) {
259 logf := tailnet.Logger(testutil.Logger(t))

Callers 1

TestDERPMeshFunction · 0.85

Calls 3

RecvMethod · 0.65
LogfMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected