integration

package
v0.0.0-...-6907ca9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper is an helper to simplify the encapsulation of integration tests

func New

func New(manager dbManager, migrationFolder string) (*Wrapper, error)

New creates a new database, sets it as the current database and returns a Wrapper object used to handle panics and clean up databases

func (*Wrapper) Close

func (it *Wrapper) Close() error

Close cleans up the tests by deleting the database

func (*Wrapper) CloseOnPanic

func (it *Wrapper) CloseOnPanic()

CloseOnPanic cleans up the tests and re-panic

func (*Wrapper) RecoverPanic

func (it *Wrapper) RecoverPanic(t *testing.T)

RecoverPanic prevents a panic from not calling the defer in the other goroutines

Jump to

Keyboard shortcuts

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