channeldb/test: test with postgres

This commit is contained in:
Joost Jager committed 2021-10-29 10:54:44 +02:00
1 parent 7c048efa21
commit d997bbf6b3
13 files changed
+152 -3

No files matched your search

+4
View File
@@ -95,6 +95,10 @@ type fixture struct {
Db walletdb.DB
}
func (b *fixture) DB() walletdb.DB {
return b.Db
}
// Dump returns the raw contents of the database.
func (b *fixture) Dump() (map[string]interface{}, error) {
dbConn, err := sql.Open("pgx", b.Dsn)
+8
View File
@@ -0,0 +1,8 @@
package postgres
import "github.com/btcsuite/btcwallet/walletdb"
type Fixture interface {
DB() walletdb.DB
Dump() (map[string]interface{}, error)
}