(req *http.Request)
| 37 | type handlerRoundTripper struct{ handler http.Handler } |
| 38 | |
| 39 | func (h *handlerRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { |
| 40 | rec := httptest.NewRecorder() |
| 41 | h.handler.ServeHTTP(rec, req) |
| 42 | resp := rec.Result() |
| 43 | resp.Request = req |
| 44 | return resp, nil |
| 45 | } |
| 46 | |
| 47 | // Verify that a factory stored on coderd.API.AIBridgeTransportFactory is |
| 48 | // observable through the normal API lifecycle: cli/server.go registers it |