Skip to content

Commit

Permalink
etcdproxy e2e tests should run in dedicated directories.
Browse files Browse the repository at this point in the history
So far all proxies were sharing the same (current) directory,
leading to tests flakes, e.g. due to certificates being overriden
in autoTLS mode.
  • Loading branch information
ptabor committed May 14, 2021
1 parent 582d02e commit c18010c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/e2e/cluster_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,23 @@ func proxyListenURL(cfg *etcdServerProcessConfig, portOffset int) string {
func newProxyV2Proc(cfg *etcdServerProcessConfig) *proxyV2Proc {
listenAddr := proxyListenURL(cfg, 2)
name := fmt.Sprintf("testname-proxy-%p", cfg)
dataDir := path.Join(cfg.dataDirPath, name+".etcd")
args := []string{
"--name", name,
"--proxy", "on",
"--listen-client-urls", listenAddr,
"--initial-cluster", cfg.name + "=" + cfg.purl.String(),
"--data-dir", dataDir,
}
return &proxyV2Proc{
proxyProc{
proxyProc: proxyProc{
lg: cfg.lg,
execPath: cfg.execPath,
args: append(args, cfg.tlsArgs...),
ep: listenAddr,
donec: make(chan struct{}),
},
name + ".etcd",
dataDir: dataDir,
}
}

Expand Down Expand Up @@ -242,6 +244,7 @@ func newProxyV3Proc(cfg *etcdServerProcessConfig) *proxyV3Proc {
"--endpoints", cfg.acurl,
// pass-through member RPCs
"--advertise-client-url", "",
"--data-dir", cfg.dataDirPath,
}
murl := ""
if cfg.murl != "" {
Expand Down

0 comments on commit c18010c

Please sign in to comment.