mustStartDefaultProxy starts a new proxy with default settings and returns it. It fails the test on error.
(tb testing.TB)
| 277 | // mustStartDefaultProxy starts a new proxy with default settings and returns |
| 278 | // it. It fails the test on error. |
| 279 | func mustStartDefaultProxy(tb testing.TB) (p *Proxy) { |
| 280 | tb.Helper() |
| 281 | |
| 282 | p = mustNew(tb, &Config{ |
| 283 | Logger: testLogger, |
| 284 | UDPListenAddr: []*net.UDPAddr{net.UDPAddrFromAddrPort(localhostAnyPort)}, |
| 285 | TCPListenAddr: []*net.TCPAddr{net.TCPAddrFromAddrPort(localhostAnyPort)}, |
| 286 | UpstreamConfig: newTestUpstreamConfig(tb, defaultTimeout, testDefaultUpstreamAddr), |
| 287 | TrustedProxies: defaultTrustedProxies, |
| 288 | }) |
| 289 | |
| 290 | servicetest.RequireRun(tb, p, testTimeout) |
| 291 | |
| 292 | return p |
| 293 | } |
| 294 | |
| 295 | // TestProxyRace sends multiple parallel DNS requests to the |
| 296 | // fully configured dnsproxy to check for race conditions |
no test coverage detected
searching dependent graphs…