testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestDBName     = "vulcanito_test"
	TestDBUser     = "vulcanito_test"
	TestDBPassword = "vulcanito_test"
	DBdialect      = "postgres"
)

Variables

View Source
var (
	TestDBconnString = fmt.Sprintf("user=%s password=%s sslmode=disable dbname=%s", TestDBUser, TestDBPassword, TestDBName)
)

Functions

func ErrToStr

func ErrToStr(err error) string

func LoadFixtures

func LoadFixtures(fixturesDir string) error

LoadFixtures ...

func PrepareDatabaseLocal

func PrepareDatabaseLocal(fixturesPath string, f func(pDialect, connectionString string, logger log.Logger, logMode bool, defaults map[string][]string) (api.VulcanitoStore, error)) (api.VulcanitoStore, error)

func SetupDB

func SetupDB(dbDirPath string) error

SetupDB initializes the db to be used in tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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