Explorar o código

e2e: add force-new-cluster flag

Gyu-Ho Lee %!s(int64=9) %!d(string=hai) anos
pai
achega
dd8e81070a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      e2e/etcd_test.go

+ 4 - 0
e2e/etcd_test.go

@@ -139,6 +139,7 @@ type etcdProcessClusterConfig struct {
 	isPeerTLS         bool
 	isPeerAutoTLS     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),