test

package
v0.0.0-...-05e5313 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertErrorMatch

func AssertErrorMatch(t *testing.T, s string, e error)

AssertErrorMatch will fail if the error doesn't match the provided error.

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError will fail if the provided err value is an error.

func MatchErrorString

func MatchErrorString(t *testing.T, s string, e error) bool

MatchErrorString takes a string and matches on the error and returns true if the string matches the error.

This is useful in table tests.

If the string can't be compiled as an regexp, then this will fail with a Fatal error.

func StartFakeArchiveServer

func StartFakeArchiveServer(t *testing.T, dir string) *httptest.Server

StartFakeArchiveServer starts an http server that serves the provided directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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