Documentation ¶
Index ¶
- func CassetteFileExists(cassetteName string) (bool, error)
- func CassetteFileName(cassetteName string) string
- func EnsureCassetteFileExists(cassetteName string) error
- func HideRecordingData(azureIDs creds.AzureIDs, s string) string
- func HideURLData(azureIDs creds.AzureIDs, s string) string
- func RedactRequestHeaders(azureIDs creds.AzureIDs, headers http.Header)
- func RedactResponseHeaders(azureIDs creds.AzureIDs, headers http.Header)
- type FakeRoundTripper
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CassetteFileExists ¶
func CassetteFileName ¶
Types ¶
type FakeRoundTripper ¶
type FakeRoundTripper struct {
// contains filtered or unexported fields
}
FakeRoundTripper is a fake implementation of http.RoundTripper used in testing.
func NewFakeRoundTripper ¶
func NewFakeRoundTripper() *FakeRoundTripper
func (*FakeRoundTripper) AddError ¶
func (fake *FakeRoundTripper) AddError(request *http.Request, err error)
AddError adds an error to the fake round tripper.
func (*FakeRoundTripper) AddResponse ¶
func (fake *FakeRoundTripper) AddResponse(request *http.Request, response *http.Response)
AddResponse adds a response to the fake round tripper.
type Interface ¶
type Interface interface { // Cfg returns the available configuration for the test Cfg() config.Values // Creds returns Azure credentials when running for real Creds() azcore.TokenCredential // IDs returns the available Azure resource IDs for the test IDs() creds.AzureIDs // Stop recording Stop() error // IsReplaying returns true if we're replaying a recorded test, false if we're recording a new test IsReplaying() bool // CreateClient creates an HTTP client configured to record or replay HTTP requests. // t is a reference to the test currently executing. CreateClient(t *testing.T) *http.Client }
Interface is a lightweight interface that allows us to swap out implementations of Go-VCR as required.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.