Documentation
¶
Overview ¶
Package plugintest provides test helpers for exercising a plugin's Connect/Session against a real target, without depending on the core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectTransport ¶
func DirectTransport() plugin.NetTransport
DirectTransport returns a plugin.NetTransport that dials targets directly, for driving a plugin Connect/Session in tests. It has no egress allow-list, so a test may reach any address it sets up.
func HTTPTransport ¶
func HTTPTransport(baseURL string, rt http.RoundTripper) plugin.NetTransport
HTTPTransport returns a plugin.NetTransport that offers an L7 client (base URL + RoundTripper), like the core's agent http_proxy mode, for testing a plugin's HTTP egress. DialContext (L4) is unavailable.
func TransportFunc ¶
func TransportFunc(dial func(ctx context.Context, network, addr string) (net.Conn, error)) plugin.NetTransport
TransportFunc returns a plugin.NetTransport whose DialContext delegates to dial — for exercising a plugin over a custom or agent-style transport in tests without standing up the core's tunnel registry.
Types ¶
This section is empty.