etcd: enable optional log file for embedded etcd log output

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.
This commit is contained in:
Andras Banki-Horvath
2021-09-08 15:10:11 +02:00
parent 75f5b407ea
commit 6c2d8bb176
9 changed files with 23 additions and 12 deletions

View File

@@ -15,8 +15,8 @@ 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) (
*etcd.Config, func(), error) {
func StartEtcdTestBackend(path string, clientPort, peerPort uint16,
logFile string) (*etcd.Config, func(), error) {
return nil, func() {}, errEtcdNotAvailable
}