testserver

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchURL

func FetchURL(url string, retries int) (*http.Response, error)

Fetch the given URL with N retries.

func SetupTestServer

func SetupTestServer(tb testing.TB) *client.Client

SetupTestServer starts a test server and sets the needed environment variables so clients pick it up. It also returns a client forcing these settings in. Unless you use the given client, this is not really thread safe due to setting a bunch of environment variables.

Types

This section is empty.

Jump to

Keyboard shortcuts

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