Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Test ¶
Test is a helper function that should be used when writing tests that make HTTP requests. It sets up everything necessary to record and replay HTTP interactions. The mode determines whether the test should record or replay interactions. Recorded interactions (a.k.a cassettes) are stored in `fixtures/${cassetteName}` adjacent to the test file that uses this function. A bootstrap function can be provided to set up the client that will be used in the test. The test function should contain the actual test logic. The cassette is passed to the test function so that it can be used to assert on the recorded interactions.
Types ¶
type BootstrapFunc ¶
BootstrapFunc is a function that is used create and return the http client that will be used in the test. Additionally, the recorder can be used to further configure recording behavior as needed. More information on addition configuration can be found here
type Cassette ¶
type Cassette func() *libcassette.Cassette
Cassette can be used to retrieve the cassette that was recorded or replayed during the test.