Documentation
¶
Overview ¶
Package dbtest is a conformance suite for db drivers. Each driver module runs it against a real database:
func TestConformance(t *testing.T) {
d, err := db.Open(sqlite.Driver(), cfg)
…
dbtest.Run(t, d)
}
The suite creates and drops its own tables, all named st_*.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunApp ¶
RunApp tests an app using the driver with anetostest: migrations, the test's transaction (seen by requests and validation rules) and its rollback. env holds the DB_* settings for a database that isn't in-memory.
func RunLocalTimeZone ¶ added in v0.3.0
RunLocalTimeZone checks a database opened with cfg, whose connection string sets a session time zone other than UTC: db.DB.Check refuses it, naming the zone, unless cfg allows local time zones.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.