testhelper

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package testhelper provides helper utilities for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTransport

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

MockTransport is a fake HTTP transport for tests.

func (*MockTransport) AddResponse

func (t *MockTransport) AddResponse(urlStr, body string)

AddResponse adds a fake response for the given URL.

func (*MockTransport) RoundTrip

func (t *MockTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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