testutil

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testutil provides helpers shared by pano's tests: a temporary CA, TLS origins, and clients that route through a proxy and trust only the test CA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pool

func Pool(a *ca.Authority) *x509.CertPool

Pool returns a cert pool trusting only a.

func ProxiedClient

func ProxiedClient(proxyAddr string, pool *x509.CertPool, h2 bool) *http.Client

ProxiedClient returns an http.Client that routes via proxyAddr and trusts only the given pool. h2 selects HTTP/2 to the proxy's TLS endpoint.

func TempCA

func TempCA(t testing.TB) *ca.Authority

TempCA creates an authority in a temp dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL