Documentation
¶
Index ¶
Constants ¶
View Source
const ( SuiteFailureTests = 1 SuiteFailureBefore = 2 SuiteFailureAfter = 3 )
FailureCodes
Variables ¶
This section is empty.
Functions ¶
func CreateTestDatabase ¶
CreateTestDatabase creates a randomized test database.
func DefaultDB ¶
func DefaultDB() *db.Connection
DefaultDB returns a default database connection for tests.
func DropTestDatabase ¶
DropTestDatabase drops a database.
Types ¶
type Option ¶
type Option func(*Suite)
Option is a mutator for a test suite.
func OptWithDefaultDB ¶
OptWithDefaultDB runs a test suite with a dedicated database connection.
type Suite ¶
type Suite struct { M *testing.M Before []SuiteAction After []SuiteAction }
Suite is a set of before and after actions for a given package tests.
type SuiteAction ¶
SuiteAction is a step that can be run either before or after package tests.
Click to show internal directories.
Click to hide internal directories.