test

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(t *testing.T, fn func())

Cleanup is a helper function to register cleanup function for a test. t.Cleanup was added in go1.14.

func NewDBMock

func NewDBMock() (*sql.DB, sqlmock.Sqlmock)

NewDBMock returns a new sql.DB and sqlmock.

func NewDBMockWithClose

func NewDBMockWithClose(t *testing.T) (*sql.DB, sqlmock.Sqlmock)

NewDBMockWithClose returns a new sql.DB and sqlmock, and close it after test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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