testclient

package
v0.1.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestHTTPClient

type TestHTTPClient struct {
	// contains filtered or unexported fields
}

TestHTTPClient wraps an HTTP client and injects test headers when env vars are set.

func NewTestHTTPClient

func NewTestHTTPClient() *TestHTTPClient

NewTestHTTPClient creates a new test HTTP client if test env vars are set. Returns nil if not in test mode.

func (*TestHTTPClient) Do

func (c *TestHTTPClient) Do(req *http.Request) (*http.Response, error)

Do executes the HTTP request, injecting test headers. Intercepts OAuth2 token exchange requests and returns a mock token response so tests don't require a real token endpoint on the mock server.

Jump to

Keyboard shortcuts

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