File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import (
3434
3535 "github.com/hashicorp/consul/agent/connect"
3636 "github.com/hashicorp/consul/agent/grpc-external/limiter"
37+ "github.com/hashicorp/consul/agent/netutil"
3738 "github.com/hashicorp/consul/agent/proxycfg"
3839 "github.com/hashicorp/consul/agent/structs"
3940 "github.com/hashicorp/consul/agent/xds/response"
@@ -188,6 +189,8 @@ func newTestServerDeltaScenario(
188189) * testServerScenario {
189190 mgr := newTestManager ()
190191 envoy := NewTestEnvoy (t , proxyID , token )
192+ originalGetAgentBindAddr := netutil .GetAgentBindAddrFunc
193+ netutil .GetAgentBindAddrFunc = netutil .GetMockGetAgentBindAddrFunc ("0.0.0.0" )
191194
192195 sink := metrics .NewInmemSink (1 * time .Minute , 1 * time .Minute )
193196 cfg := metrics .DefaultConfig ("consul.xds.test" )
@@ -197,6 +200,7 @@ func newTestServerDeltaScenario(
197200
198201 t .Cleanup (func () {
199202 envoy .Close ()
203+ netutil .GetAgentBindAddrFunc = originalGetAgentBindAddr
200204 sink := & metrics.BlackholeSink {}
201205 metrics .NewGlobal (cfg , sink )
202206 })
You can’t perform that action at this time.
0 commit comments