mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
test: drop unused code
This commit is contained in:
parent
49e4de24c4
commit
db3599762f
@ -4,7 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
@ -35,7 +34,6 @@ type agentWrapper struct {
|
|||||||
config *agent.Config
|
config *agent.Config
|
||||||
agent *agent.Agent
|
agent *agent.Agent
|
||||||
http *agent.HTTPServer
|
http *agent.HTTPServer
|
||||||
addr string
|
|
||||||
httpAddr string
|
httpAddr string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,13 +61,7 @@ func testAgentWithConfig(t *testing.T, cb func(c *agent.Config)) *agentWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testAgentWithConfigReload(t *testing.T, cb func(c *agent.Config), reloadCh chan chan error) *agentWrapper {
|
func testAgentWithConfigReload(t *testing.T, cb func(c *agent.Config), reloadCh chan chan error) *agentWrapper {
|
||||||
l, err := net.Listen("tcp", "127.0.0.1:0")
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("err: %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
lw := logger.NewLogWriter(512)
|
lw := logger.NewLogWriter(512)
|
||||||
|
|
||||||
conf := nextConfig()
|
conf := nextConfig()
|
||||||
if cb != nil {
|
if cb != nil {
|
||||||
cb(conf)
|
cb(conf)
|
||||||
@ -105,7 +97,6 @@ func testAgentWithConfigReload(t *testing.T, cb func(c *agent.Config), reloadCh
|
|||||||
config: conf,
|
config: conf,
|
||||||
agent: a,
|
agent: a,
|
||||||
http: http[0],
|
http: http[0],
|
||||||
addr: l.Addr().String(),
|
|
||||||
httpAddr: httpAddr,
|
httpAddr: httpAddr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user