MCPcopy
hub / github.com/cloudflare/cloudflared / TestSocksConnection

Function TestSocksConnection

socks/connection_handler_test.go:79–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestSocksConnection(t *testing.T) {
80 startTestServer(t, OkJSONResponseHandler)
81 time.Sleep(100 * time.Millisecond)
82 b := sendSocksRequest(t)
83 assert.True(t, len(b) > 0, "no data returned!")
84
85 var resp successResponse
86 json.Unmarshal(b, &resp)
87
88 assert.True(t, resp.Status == "ok", "response didn't return ok")
89}

Callers

nothing calls this directly

Calls 3

startTestServerFunction · 0.85
sendSocksRequestFunction · 0.85
UnmarshalMethod · 0.45

Tested by

no test coverage detected