lnd.xprv/channeldb/kvdb/etcd/driver_test.go
Andras Banki-Horvath 85aee9b064 kvdb+lncfg: fully move etcd behind build tag
This commit separates all etcd related sources (sans a few stubs and
config) from the rest of the source tree and makes compilation conditional
depending on whether the kvdb_etcd build tag is specified.
2020-05-22 11:26:25 +02:00

31 lines
521 B
Go

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