lnd.xprv/channeldb/kvdb/etcd/driver_test.go
2020-07-28 17:57:24 +02:00

31 lines
530 B
Go

// +build kvdb_etcd
package etcd
import (
"testing"
"github.com/btcsuite/btcwallet/walletdb"
"github.com/stretchr/testify/require"
)
func TestOpenCreateFailure(t *testing.T) {
t.Parallel()
db, err := walletdb.Open(dbType)
require.Error(t, err)
require.Nil(t, db)
db, err = walletdb.Open(dbType, "wrong")
require.Error(t, err)
require.Nil(t, db)
db, err = walletdb.Create(dbType)
require.Error(t, err)
require.Nil(t, db)
db, err = walletdb.Create(dbType, "wrong")
require.Error(t, err)
require.Nil(t, db)
}