newTestServer returns an httptest origin plus a proxy that rewrites inbound forward-proxy-style requests to target that origin. DuckDB sends absolute-form URIs (scheme + host + path); we give the test the origin's URL so the proxy's fetchOrigin hits httptest.Server directly.
(t *testing.T, handler http.HandlerFunc)
| 99 | |
| 100 | func (b *syncBuffer) Write(p []byte) (int, error) { |
| 101 | b.mu.Lock() |
| 102 | defer b.mu.Unlock() |
| 103 | return b.buf.Write(p) |
| 104 | } |
| 105 | |
| 106 | func (b *syncBuffer) String() string { |
| 107 | b.mu.Lock() |
| 108 | defer b.mu.Unlock() |
| 109 | return b.buf.String() |
| 110 | } |
no outgoing calls
no test coverage detected