Skip to content
Snippets Groups Projects
Commit 5746457e68bc authored by Christophe de Vienne's avatar Christophe de Vienne
Browse files

database test functions now also accept benchmarks

parent 7908dfbcac1f
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
const dbLockID = 15104
func clearDB(t *testing.T, c *sqlx.Conn, dsn string) {
func clearDB(t testing.TB, c *sqlx.Conn, dsn string) {
// Drop all tables, and reinit
if _, err := c.ExecContext(context.Background(), "DROP SCHEMA IF EXISTS public CASCADE"); err != nil {
t.Fatal(err)
......@@ -72,7 +72,7 @@
// GetTestDB creates a db and returns it. It must be closed within the test.
// If it fails, t.Fatal() is called
func GetTestDB(t *testing.T, sourceDriver source.Driver) *TestDB {
func GetTestDB(t testing.TB, sourceDriver source.Driver) *TestDB {
var success bool
dsn := os.Getenv("TEST_DB_DSN")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment