Documentation ¶
Overview ¶
Package dbtest contains supporting code for running tests that hit the DB.
Index ¶
Constants ¶
View Source
const ( Success = "\u2713" Failed = "\u2717" )
Success and failure markers.
Variables ¶
This section is empty.
Functions ¶
func NewUnit ¶
func NewUnit(t *testing.T, c *docker.Container, dbName string) (*zap.SugaredLogger, *bun.DB, func())
NewUnit creates a test database inside a Docker container. It creates the required table structure but the database is otherwise empty. It returns the database to use as well as a function to call at the end of the test.
Types ¶
Click to show internal directories.
Click to hide internal directories.