test

package
v0.0.0-...-974506c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufLog

func BufLog(t *testing.T, r io.Reader, msg string) io.Reader

BufLog takes a reader and log it and return another reader with the same content

func NewBearerToken

func NewBearerToken() string

NewBearerToken generates a token with 1 minute validity

func NewTestDB

func NewTestDB() (*sql.DB, config.Configuration)

NewTestDB initializes a test database

func NewTestServer

func NewTestServer(path, method string, fn func(w http.ResponseWriter, r *http.Request)) *httptest.Server

NewTestServer helper for testing

func ResetDB

func ResetDB(DB *sql.DB, conf config.Configuration)

ResetDB reset database to postgres

Types

This section is empty.

Jump to

Keyboard shortcuts

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