extauth

package
v0.0.0-...-a149323 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEndpoint

func AssertEndpoint(t *testing.T, method, url string, headers map[string]string, expectedHttpCode int)

AssertEndpoint dials `url` and asserts the response status. When TEST_IP_FAMILY selects more than one network the request is run once per family inside a t.Run(<network>, ...) sub-test; single-family runs match pre-dualstack behaviour byte for byte. Failures are reported via subtest t.Errorf / t.Fatal — no error return.

func AssertEndpointWithJWT

func AssertEndpointWithJWT(t *testing.T, method, url string, expectedHttpCode int, provider oauth2.Provider, options ...oauth2.RequestOption)

AssertEndpointWithJWT dials `url` with a JWT provider and asserts the response status. Failures are reported via subtest t.Errorf / t.Fatal (through the underlying require/assert helpers) and cause the subtest to fail; there is no error return because there is no assertion-level error a caller would meaningfully act on.

The JWT provider owns its HTTP client construction, so we cannot hand it the family-pinned client from ForEachDialNetwork. Instead we thread the selected network into the provider via oauth2.WithNetwork so the authenticated dial is exercised over the family selected by TEST_IP_FAMILY. On k3d (TEST_IP_FAMILY unset) the network is "" and behaviour is byte-identical to before.

Types

This section is empty.

Jump to

Keyboard shortcuts

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