testing

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testing provides support for end-to-end functional tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Runner

func Runner(m *testing.M, opts ...Option) func(context.Context) error

Runner can be used in a TestMain function for package tests to ensure that their dependencies have been initialized properly. To use it, your TestMain function should look like:

func TestMain(m *testing.M) {
  nilgo.Run(
    nilgo.WithGoLeak(),
    fixtures_and_runners...,
    nilgo.Runner(m),
  )
}

See https://golang.org/pkg/testing/#hdr-Main for more details.

Types

type Option

type Option func(*options)

Option configures how it runs tests.

func WithSocketGate

func WithSocketGate(addresses ...string) Option

WithSocketGate enables provided gate function blocks the start of the tests until sockets open.

Jump to

Keyboard shortcuts

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