For e2e_node tests tell etcd to listen on ports 2379 and 4001

This is the default for etcd2, but etcd3 only listens on 2379.
Specifying the ports keeps things consistent no matter which
version the user has installed.
This commit is contained in:
Bryan Boreham 2016-07-20 10:01:08 +01:00 committed by Bryan Boreham
parent 5b7f7e7bd3
commit dbc59aad7c

View File

@ -190,7 +190,9 @@ func (es *e2eService) startEtcd() (*killCmd, error) {
}
etcdPath = defaultEtcdPath
}
cmd := exec.Command(etcdPath)
cmd := exec.Command(etcdPath,
"--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001",
"--advertise-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001")
// Execute etcd in the data directory instead of using --data-dir because the flag sometimes requires additional
// configuration (e.g. --name in version 0.4.9)
cmd.Dir = es.etcdDataDir