Documentation ¶
Overview ¶
Package testsconfig defines the various parameters and methods needed to be set up pg and sqlite dbs for tests to run successfully.
Index ¶
Constants ¶
View Source
const ( PGChartsTestsHost = "localhost" PGChartsTestsPort = "5432" PGChartsTestsUser = "bitumdata" PGChartsTestsPass = "" PGChartsTestsDBName = "bitumdata_mainnet_test" )
Test DB server and database config.
Variables ¶
This section is empty.
Functions ¶
func CustomScanner ¶
func CustomScanner(m Migrations) error
CustomScanner enables a given *.sql file dump to be scanned and loaded into the respectived query runner using the Runner method.
func SqliteDbFilePath ¶
SqliteDbFilePath returns the absolute sqlite db filepath when accessed from bitumsqlite package.
func SqliteDumpDataFilePath ¶
SqliteDumpDataFilePath returns the path to the sqlite db dump data filepath when accessed from bitumsqlite package.
Types ¶
type Migrations ¶
type Migrations interface { // Path returns the filepath to the *.sql dump file. Path() string // Runner executes the scanned individual queries one after another. Runner(query string) error }
Migrations enables a custom migration runner to be used to load data from a given *.sql file dump into the migrations runner method.
Click to show internal directories.
Click to hide internal directories.