From 02027279906725c721447f1745d7dbd8d9862c45 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sun, 24 Mar 2024 14:19:01 +0100 Subject: [PATCH] schema handling for postgres --- tests/etc/etc_sql.go | 2 ++ tests/storage_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/etc/etc_sql.go b/tests/etc/etc_sql.go index 8196143..a26814f 100644 --- a/tests/etc/etc_sql.go +++ b/tests/etc/etc_sql.go @@ -18,6 +18,7 @@ func ConfigPgsql() *sql.Cfg { return &sql.Cfg{ Driver: "postgres", Connstr: ovr("user=ccotest password=cco dbname=ccotest", PGSQL_CONNSTR), + Schema: ovr("testing", PGSQL_SCHEMA), } } @@ -26,6 +27,7 @@ func ConfigPgsql() *sql.Cfg { const ( SQLITE_CONNSTR = "sqlite_connstr" PGSQL_CONNSTR = "pgsql_connstr" + PGSQL_SCHEMA = "pgsql_schema" ) // in a production scenario this should be put in a separate diff --git a/tests/storage_test.go b/tests/storage_test.go index 10df45e..6e420d1 100644 --- a/tests/storage_test.go +++ b/tests/storage_test.go @@ -80,7 +80,7 @@ func resetSqlite(db *sql.Storage) { func resetPgsql(db *sql.Storage) { db.DropTable("test") - db.DropTable("tracks") + db.DropTable("testing.tracks") db.Exec(pgsql_create_table) }