mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
6c2d8bb176
In this commit we add an extra config for enabling logging to an external file when using embedded etcd. This can be useful when running integration tests to see more details about etcd related issues.
23 lines
596 B
Go
23 lines
596 B
Go
// +build !kvdb_etcd
|
|
|
|
package kvdb
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/lightningnetwork/lnd/kvdb/etcd"
|
|
)
|
|
|
|
// TestBackend is conditionally set to bdb when the kvdb_etcd build tag is
|
|
// not defined, allowing testing our database code with bolt backend.
|
|
const TestBackend = BoltBackendName
|
|
|
|
var errEtcdNotAvailable = fmt.Errorf("etcd backend not available")
|
|
|
|
// StartEtcdTestBackend is a stub returning nil, and errEtcdNotAvailable error.
|
|
func StartEtcdTestBackend(path string, clientPort, peerPort uint16,
|
|
logFile string) (*etcd.Config, func(), error) {
|
|
|
|
return nil, func() {}, errEtcdNotAvailable
|
|
}
|