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 committed 2021-09-10 14:40:54 +02:00
1 parent 75f5b407ea
commit 6c2d8bb176
9 files changed
+23 -12

No files matched your search

+3 -3
View File
@@ -12,10 +12,10 @@ const TestBackend = EtcdBackendName
// GetEtcdTestBackend creates an embedded etcd backend for testing
// storig the database at the passed path.
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 etcd.NewEmbeddedEtcdInstance(
path, clientPort, peerPort,
path, clientPort, peerPort, logFile,
)
}