MCPcopy Create free account
hub / github.com/coder/coder / expectNotRouted

Method expectNotRouted

enterprise/aibridgeproxyd/reload_test.go:239–246  ·  view source on GitHub ↗

expectNotRouted asserts the proxy did not MITM the request for the given host. The CONNECT either falls through to the tunneled path (where the .invalid hostname fails to dial) or to a 502 from the proxy. Either way, aibridged never sees the request.

(t *testing.T, targetURL string)

Source from the content-addressed store, hash-verified

237// (where the .invalid hostname fails to dial) or to a 502 from the
238// proxy. Either way, aibridged never sees the request.
239func (h *reloadTestHarness) expectNotRouted(t *testing.T, targetURL string) {
240 t.Helper()
241
242 h.recorder.reset()
243 _ = h.sendRequest(t, targetURL)
244 require.Empty(t, h.recorder.load(),
245 "aibridged must not be reached for non-routed host %s", targetURL)
246}
247
248// expectProviderStatus asserts the provider_info series for (name,
249// status) is present with value 1.

Calls 5

sendRequestMethod · 0.95
loadMethod · 0.80
HelperMethod · 0.65
resetMethod · 0.45
EmptyMethod · 0.45

Tested by

no test coverage detected