mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-08 00:42:25 +02:00
Use dedicated port for peer listener when testing.
This commit is contained in:
parent
716be91feb
commit
dddf194b48
|
@ -83,6 +83,9 @@ func newEtcdForTesting(t *testing.T) *embed.Etcd {
|
||||||
httpListener := u
|
httpListener := u
|
||||||
httpListener.Host = net.JoinHostPort("localhost", strconv.Itoa(port+1))
|
httpListener.Host = net.JoinHostPort("localhost", strconv.Itoa(port+1))
|
||||||
cfg.ListenClientHttpUrls = []url.URL{*httpListener}
|
cfg.ListenClientHttpUrls = []url.URL{*httpListener}
|
||||||
|
peerListener := u
|
||||||
|
peerListener.Host = net.JoinHostPort("localhost", strconv.Itoa(port+2))
|
||||||
|
cfg.ListenPeerUrls = []url.URL{*peerListener}
|
||||||
etcd, err = embed.StartEtcd(cfg)
|
etcd, err = embed.StartEtcd(cfg)
|
||||||
if isErrorAddressAlreadyInUse(err) {
|
if isErrorAddressAlreadyInUse(err) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue