mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #5376 from gyuho/e2e_typo
e2e: add 'force-new-cluster' flag, fix typo
This commit is contained in:
@@ -140,7 +140,7 @@ func (cx *ctlCtx) PrefixArgs() []string {
|
||||
}
|
||||
cmdArgs := []string{"../bin/etcdctl", "--endpoints", endpoints, "--dial-timeout", cx.dialTimeout.String()}
|
||||
if cx.epc.cfg.clientTLS == clientTLS {
|
||||
if cx.epc.cfg.isClientAuthTLS {
|
||||
if cx.epc.cfg.isClientAutoTLS {
|
||||
cmdArgs = append(cmdArgs, "--insecure-transport=false", "--insecure-skip-tls-verify")
|
||||
} else {
|
||||
cmdArgs = append(cmdArgs, "--cacert", caPath, "--cert", certPath, "--key", privateKeyPath)
|
||||
|
||||
@@ -74,7 +74,7 @@ var (
|
||||
configClientAutoTLS = etcdProcessClusterConfig{
|
||||
clusterSize: 1,
|
||||
proxySize: 0,
|
||||
isClientAuthTLS: true,
|
||||
isClientAutoTLS: true,
|
||||
clientTLS: clientTLS,
|
||||
initialToken: "new",
|
||||
}
|
||||
@@ -138,7 +138,8 @@ type etcdProcessClusterConfig struct {
|
||||
clientTLS clientConnType
|
||||
isPeerTLS bool
|
||||
isPeerAutoTLS bool
|
||||
isClientAuthTLS bool
|
||||
isClientAutoTLS bool
|
||||
forceNewCluster bool
|
||||
initialToken string
|
||||
quotaBackendBytes int64
|
||||
}
|
||||
@@ -248,6 +249,9 @@ func (cfg *etcdProcessClusterConfig) etcdProcessConfigs() []*etcdProcessConfig {
|
||||
"--initial-cluster-token", cfg.initialToken,
|
||||
"--data-dir", dataDirPath,
|
||||
}
|
||||
if cfg.forceNewCluster {
|
||||
args = append(args, "--force-new-cluster")
|
||||
}
|
||||
if cfg.quotaBackendBytes > 0 {
|
||||
args = append(args,
|
||||
"--quota-backend-bytes", fmt.Sprintf("%d", cfg.quotaBackendBytes),
|
||||
@@ -296,7 +300,7 @@ func (cfg *etcdProcessClusterConfig) etcdProcessConfigs() []*etcdProcessConfig {
|
||||
|
||||
func (cfg *etcdProcessClusterConfig) tlsArgs() (args []string) {
|
||||
if cfg.clientTLS != clientNonTLS {
|
||||
if cfg.isClientAuthTLS {
|
||||
if cfg.isClientAutoTLS {
|
||||
args = append(args, "--auto-tls=true")
|
||||
} else {
|
||||
tlsClientArgs := []string{
|
||||
|
||||
Reference in New Issue
Block a user