Documentation
¶
Index ¶
- func ClockFromContext(ctx context.Context) clockwork.FakeClock
- func ConfigureTracer(m *testing.M)
- func FilterInteraction(i *cassette.Interaction) error
- func IsCIRun() bool
- func MatchInteraction(r *http.Request, i cassette.Request) bool
- func ReadFixture(path string) (string, error)
- func Recorder(ctx context.Context, t *testing.T) (*recorder.Recorder, error)
- func RestoreClock(t *testing.T) clockwork.FakeClock
- func Retry(interval time.Duration, count int, call func() bool) error
- func SetClock(t *testing.T) clockwork.FakeClock
- func UniqueEntityName(ctx context.Context, t *testing.T) *string
- func WithClock(ctx context.Context, t *testing.T) context.Context
- func WithTestSpan(ctx context.Context, t *testing.T) (context.Context, func())
- func WrapRoundTripper(rt http.RoundTripper, opts ...ddhttp.RoundTripperOption) http.RoundTripper
- type Assertions
- type RecordingMode
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClockFromContext ¶
ClockFromContext returns clock or panics.
func FilterInteraction ¶
func FilterInteraction(i *cassette.Interaction) error
FilterInteraction removes secret arguments from the URL.
func IsCIRun ¶
func IsCIRun() bool
IsCIRun returns true if the CI environment variable is set to "true"
func MatchInteraction ¶
MatchInteraction checks if the request matches a store request in the given cassette.
func ReadFixture ¶
ReadFixture opens the file at path and returns the contents as a string
func RestoreClock ¶
RestoreClock restore current time from .freeze file.
func UniqueEntityName ¶
UniqueEntityName will return a unique string that can be used as a title/description/summary/... of an API entity. When used in Azure Pipelines and RECORD=true or RECORD=none, it will include BuildId to enable mapping resources that weren't deleted to builds.
func WithTestSpan ¶
WithTestSpan starts new span with test information.
func WrapRoundTripper ¶
func WrapRoundTripper(rt http.RoundTripper, opts ...ddhttp.RoundTripperOption) http.RoundTripper
WrapRoundTripper includes tracing information.
Types ¶
type RecordingMode ¶
type RecordingMode string
RecordingMode defines valid usage of cassette recorder
const ( ModeIgnore RecordingMode = "none" ModeReplaying RecordingMode = "false" ModeRecording RecordingMode = "true" )
Valid usage modes for cassette recorder
func GetRecording ¶
func GetRecording() RecordingMode
GetRecording returns the value of RECORD environment variable