test

package
v0.0.0-...-0325488 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Test

type Test struct {
	suite.Suite
}

Test has test helpers

func (*Test) Exits

func (t *Test) Exits(f func())

Exits asserts that the function passed as parameter exits with an unsuccessful code to test functions with commands or that returns values, you can do this: tests.AssertExits(t func() { funcWithArgs(a, b) }) TODO: Coverage

func (*Test) FreePort

func (t *Test) FreePort() int

FreePort returns a free port to listen to https://github.com/phayes/freeport

func (*Test) GenerateCert

func (t *Test) GenerateCert(fs afero.Fs, certname, path string)

GenerateCert generates a new TLS certificate and stores it into fs.FS: `path/certname.key` and `path/certname.crt`

Jump to

Keyboard shortcuts

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