mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-09 23:12:33 +02:00
channeldb/test: test with postgres
This commit is contained in:
@ -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
kvdb/postgres/fixture_interface.go
Normal file
8
kvdb/postgres/fixture_interface.go
Normal file
@ -0,0 +1,8 @@
|
||||
package postgres
|
||||
|
||||
import "github.com/btcsuite/btcwallet/walletdb"
|
||||
|
||||
type Fixture interface {
|
||||
DB() walletdb.DB
|
||||
Dump() (map[string]interface{}, error)
|
||||
}
|
Reference in New Issue
Block a user