(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestProbeSNITimeout(t *testing.T) { |
| 95 | // 10.255.255.1 is TEST-NET-unused-ish; on many hosts it silently drops. |
| 96 | // Use a very short timeout so the test doesn't stall if the net does route. |
| 97 | r := ProbeSNI(context.Background(), "example.com", ProbeConfig{ |
| 98 | TargetIP: netip.MustParseAddr("192.0.2.1"), // TEST-NET-1 |
| 99 | TargetPort: 443, |
| 100 | ConnectTimeout: 250 * time.Millisecond, |
| 101 | }) |
| 102 | if r.Outcome != OutcomeTimeout && r.Outcome != OutcomeTCPRefused { |
| 103 | t.Fatalf("outcome: %s (want timeout or refused)", r.Outcome) |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func TestProbeSNIsConcurrent(t *testing.T) { |
| 108 | addr, stop := tlsTestServer(t) |
nothing calls this directly
no test coverage detected