mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Merge pull request #283 from strukturag/etcd-tests-running
Fix testing etcd server not starting up if etcd is running on host.
This commit is contained in:
commit
ddb7ece622
1 changed files with 5 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ func NewEtcdForTest(t *testing.T) *embed.Etcd {
|
|||
u.Host = net.JoinHostPort("localhost", strconv.Itoa(port))
|
||||
cfg.LCUrls = []url.URL{*u}
|
||||
cfg.ACUrls = []url.URL{*u}
|
||||
peerListener := u
|
||||
peerListener.Host = net.JoinHostPort("localhost", strconv.Itoa(port+1))
|
||||
cfg.LPUrls = []url.URL{*peerListener}
|
||||
cfg.APUrls = []url.URL{*peerListener}
|
||||
cfg.InitialCluster = "default=" + peerListener.String()
|
||||
etcd, err = embed.StartEtcd(cfg)
|
||||
if isErrorAddressAlreadyInUse(err) {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue