testhelper

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualFiles

func AssertEqualFiles(t testing.TB, want, actual string) bool

AssertEqualFiles asserts that files at want and actual have the same content

func DownloadablesPath

func DownloadablesPath(path string) string

DownloadablesPath path to a file or directory in testdata/downloadables

func ProjectPath

func ProjectPath(path ...string) string

ProjectPath exchanges a path relative to the project root for an absolute path

func ProjectRoot

func ProjectRoot() string

ProjectRoot returns the absolute path of the project root

func ServeFile

func ServeFile(file, path, query string) *httptest.Server

ServeFile runs a test server

func TmpDir

func TmpDir(t *testing.T) (string, func())

TmpDir returns the path to a newly created tmp dir and a function for deleting that dir

Types

This section is empty.

Jump to

Keyboard shortcuts

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