Documentation
¶
Index ¶
- Constants
- func CassettePath(dir, name string) string
- func ModeForEnvironment() recorder.Mode
- func NewRecorder(cassettePath string) (*recorder.Recorder, error)
- func RedactSensitiveHeaders(i *cassette.Interaction) error
- func StableMatcher() recorder.MatcherFunc
- func UseDefaultTransport(t testing.TB, rec *recorder.Recorder)
Constants ¶
const RecordProviderCassettesEnv = "FIZEAU_RECORD_PROVIDER_CASSETTES"
Variables ¶
This section is empty.
Functions ¶
func CassettePath ¶
CassettePath joins a base directory and cassette name using the file layout go-vcr expects.
func ModeForEnvironment ¶
ModeForEnvironment selects the cassette mode for provider tests.
Replay-only is the default so tests stay offline unless an explicit record run is requested.
func NewRecorder ¶
NewRecorder creates a recorder rooted at cassettePath.
The recorder defaults to replay-only mode, uses a stable matcher that ignores host/port churn and common auth/header noise, and redacts secret headers before saving.
func RedactSensitiveHeaders ¶
func RedactSensitiveHeaders(i *cassette.Interaction) error
RedactSensitiveHeaders removes auth/API key headers before a cassette is written to disk.
func StableMatcher ¶
func StableMatcher() recorder.MatcherFunc
StableMatcher compares requests by method, normalized URL, headers, and body.
The URL normalization intentionally ignores scheme/host/port so the same cassette can be replayed against different local servers while still distinguishing /v1/models, /metrics, /slots, and /v1/chat/completions.
Types ¶
This section is empty.