mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
e2e: use endpoints flag
This commit is contained in:
parent
ca05f55a21
commit
07030d59dd
@ -15,6 +15,7 @@
|
|||||||
package e2e
|
package e2e
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -214,13 +215,17 @@ func testCtlV2GetRoleUser(t *testing.T, cfg *etcdProcessClusterConfig) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func etcdctlPrefixArgs(clus *etcdProcessCluster, noSync bool) []string {
|
func etcdctlPrefixArgs(clus *etcdProcessCluster, noSync bool) []string {
|
||||||
endpoint := ""
|
endpoints := ""
|
||||||
if proxies := clus.proxies(); len(proxies) != 0 {
|
if proxies := clus.proxies(); len(proxies) != 0 {
|
||||||
endpoint = proxies[0].cfg.acurl.String()
|
endpoints = proxies[0].cfg.acurl.String()
|
||||||
} else if backends := clus.backends(); len(backends) != 0 {
|
} else if backends := clus.backends(); len(backends) != 0 {
|
||||||
endpoint = backends[0].cfg.acurl.String()
|
es := []string{}
|
||||||
|
for _, b := range backends {
|
||||||
|
es = append(es, b.cfg.acurl.String())
|
||||||
|
}
|
||||||
|
endpoints = strings.Join(es, ",")
|
||||||
}
|
}
|
||||||
cmdArgs := []string{"../bin/etcdctl", "--endpoint", endpoint}
|
cmdArgs := []string{"../bin/etcdctl", "--endpoints", endpoints}
|
||||||
if noSync {
|
if noSync {
|
||||||
cmdArgs = append(cmdArgs, "--no-sync")
|
cmdArgs = append(cmdArgs, "--no-sync")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user