Documentation
¶
Overview ¶
Package dbtest opens a fresh database per test for every configured dialect. SQLite always runs. Set WT_TEST_POSTGRES and/or WT_TEST_MYSQL to a server DSN (see `task db:up`) to run the same test against Postgres and MySQL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EachDSN ¶
EachDSN runs fn once per available dialect, as Each does, with the driver and data source name of an empty database instead of an open one, for tests that open the database themselves, such as a whole site (webthings.Config's Driver and DSN). A server's database is dropped after the test, once what the test opened is closed.
func ForeignKeyError ¶
ForeignKeyError returns a real foreign key violation from SQLite, for tests of code that turns db.IsForeignKey errors into messages.
Types ¶
This section is empty.