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:
9 files changed
+23
-12
No files matched your search
+3
-3
@@ -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,
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user