newAPIToolForTest constructs an APITool that bypasses SSRF dial-time protection so tests can talk to httptest.NewServer (which binds to 127.0.0.1). It is defined in a *_test.go file so it is not compiled into release binaries. Production callers must use [New].
(apiConfig latest.APIToolConfig, expander *js.Expander)
| 25 | // 127.0.0.1). It is defined in a *_test.go file so it is not compiled |
| 26 | // into release binaries. Production callers must use [New]. |
| 27 | func newAPIToolForTest(apiConfig latest.APIToolConfig, expander *js.Expander) *ToolSet { |
| 28 | return New(apiConfig, expander, WithAllowPrivateIPs(true)) |
| 29 | } |
| 30 | |
| 31 | type testServer struct { |
| 32 | serverURL string |
no test coverage detected