testutil

package
v0.0.0-...-edcad5e Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewDevelopmentDB

func MustNewDevelopmentDB() (ddlDB *sqlx.DB, teardown func() error)

MustNewDevelopmentDB creates a new development DB. It also returns a function to teardown it after the test.

func MustNewDevelopmentSugaredLogger

func MustNewDevelopmentSugaredLogger() *zap.SugaredLogger

MustNewDevelopmentSugaredLogger returns a development sugared logger.

func RandomString

func RandomString(n int) string

RandomString generates a random string with given length. Notice: this function uses a pseudo random algorithm, only for use in test.

func SkipExternal

func SkipExternal(t *testing.T)

SkipExternal will skip the test if mode is not external

Types

This section is empty.

Jump to

Keyboard shortcuts

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