testutil

package
v0.0.0-...-3aa76b9 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRequest

func CreateRequest(method, url string, body io.Reader) *http.Request

CreateRequest creates a http request for testing.

func InMemoryDB

func InMemoryDB(migrate bool, migrationsPath string) *sql.DB

InMemoryDB creates an in memory sql database and applies migrations if desired.

func PerformRequest

func PerformRequest(r http.Handler, req *http.Request) *httptest.ResponseRecorder

PerformRequest perform a test request against a given handler, returing a recorder of the response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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