testhelpers

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TempDir temp folder for sqlite database
	TempDir string
	// PostgresTestDatabase postgresql database config details
	PostgresTestDatabase *database.Config
	// MigrationDir default folder for migration's
	MigrationDir = filepath.Join("..", "..", "migrations")
)

Functions

func CheckValidConfig

func CheckValidConfig(config *drivers.ConnectionDetails) bool

CheckValidConfig checks if database connection details are empty

func CloseDatabase

func CloseDatabase(conn *database.Instance) (err error)

CloseDatabase closes database connection

func ConnectToDatabase

func ConnectToDatabase(conn *database.Config) (dbConn *database.Instance, err error)

ConnectToDatabase opens connection to database and returns pointer to instance of database.DB

func EnableVerboseTestOutput

func EnableVerboseTestOutput() error

EnableVerboseTestOutput enables debug output for SQL queries

func GetConnectionDetails

func GetConnectionDetails() *database.Config

GetConnectionDetails returns connection details for CI or test db instances

Types

This section is empty.

Jump to

Keyboard shortcuts

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