|
@@ -26,13 +26,14 @@ import (
|
|
|
"github.com/coreos/etcd/pkg/fileutil"
|
|
"github.com/coreos/etcd/pkg/fileutil"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-const (
|
|
|
|
|
- etcdProcessBasePort = 20000
|
|
|
|
|
- certPath = "../integration/fixtures/server.crt"
|
|
|
|
|
- privateKeyPath = "../integration/fixtures/server.key.insecure"
|
|
|
|
|
- caPath = "../integration/fixtures/ca.crt"
|
|
|
|
|
- defaultBinPath = "../bin/etcd"
|
|
|
|
|
- defaultCtlBinPath = "../bin/etcdctl"
|
|
|
|
|
|
|
+const etcdProcessBasePort = 20000
|
|
|
|
|
+
|
|
|
|
|
+var (
|
|
|
|
|
+ binPath string
|
|
|
|
|
+ ctlBinPath string
|
|
|
|
|
+ certPath string
|
|
|
|
|
+ privateKeyPath string
|
|
|
|
|
+ caPath string
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
type clientConnType int
|
|
type clientConnType int
|
|
@@ -207,12 +208,18 @@ func newEtcdProcess(cfg *etcdProcessConfig) (*etcdProcess, error) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (cfg *etcdProcessClusterConfig) etcdProcessConfigs() []*etcdProcessConfig {
|
|
func (cfg *etcdProcessClusterConfig) etcdProcessConfigs() []*etcdProcessConfig {
|
|
|
|
|
+ binPath = binDir + "/etcd"
|
|
|
|
|
+ ctlBinPath = binDir + "/etcdctl"
|
|
|
|
|
+ certPath = certDir + "/server.crt"
|
|
|
|
|
+ privateKeyPath = certDir + "/server.key.insecure"
|
|
|
|
|
+ caPath = certDir + "/ca.crt"
|
|
|
|
|
+
|
|
|
if cfg.basePort == 0 {
|
|
if cfg.basePort == 0 {
|
|
|
cfg.basePort = etcdProcessBasePort
|
|
cfg.basePort = etcdProcessBasePort
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if cfg.execPath == "" {
|
|
if cfg.execPath == "" {
|
|
|
- cfg.execPath = defaultBinPath
|
|
|
|
|
|
|
+ cfg.execPath = binPath
|
|
|
}
|
|
}
|
|
|
if cfg.snapCount == 0 {
|
|
if cfg.snapCount == 0 {
|
|
|
cfg.snapCount = etcdserver.DefaultSnapCount
|
|
cfg.snapCount = etcdserver.DefaultSnapCount
|