fix test compiling
This commit is contained in:
parent
7d9c069f09
commit
9baa7402ef
|
@ -45,7 +45,7 @@ func newFakeAllocRunner(t *testing.T, logger hclog.Logger) *fakeAllocRunner {
|
|||
return &fakeAllocRunner{
|
||||
alloc: alloc,
|
||||
AllocDir: allocdir.NewAllocDir(logger, path),
|
||||
Broadcaster: cstructs.NewAllocBroadcaster(alloc),
|
||||
Broadcaster: cstructs.NewAllocBroadcaster(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,14 +36,14 @@ func (cp *fauxConnPool) Ping(net.Addr) error {
|
|||
}
|
||||
|
||||
func testManager(t *testing.T) (m *Manager) {
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
m = New(logger, shutdownCh, &fauxConnPool{})
|
||||
return m
|
||||
}
|
||||
|
||||
func testManagerFailProb(t *testing.T, failPct float64) (m *Manager) {
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
m = New(logger, shutdownCh, &fauxConnPool{failPct: failPct})
|
||||
return m
|
||||
|
@ -136,7 +136,7 @@ func TestManagerInternal_refreshServerRebalanceTimer(t *testing.T) {
|
|||
{1000000, 19, 10 * time.Minute},
|
||||
}
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
|
||||
for _, s := range clusters {
|
||||
|
|
|
@ -33,14 +33,14 @@ func (cp *fauxConnPool) Ping(net.Addr) error {
|
|||
}
|
||||
|
||||
func testManager(t *testing.T) (m *servers.Manager) {
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
m = servers.New(logger, shutdownCh, &fauxConnPool{})
|
||||
return m
|
||||
}
|
||||
|
||||
func testManagerFailProb(t *testing.T, failPct float64) (m *servers.Manager) {
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
m = servers.New(logger, shutdownCh, &fauxConnPool{failPct: failPct})
|
||||
return m
|
||||
|
@ -113,7 +113,7 @@ func TestServers_FindServer(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestServers_New(t *testing.T) {
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
shutdownCh := make(chan struct{})
|
||||
m := servers.New(logger, shutdownCh, &fauxConnPool{})
|
||||
if m == nil {
|
||||
|
|
|
@ -26,7 +26,7 @@ func TestHostStats_CPU(t *testing.T) {
|
|||
assert := assert.New(t)
|
||||
assert.Nil(shelpers.Init())
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
cwd, err := os.Getwd()
|
||||
assert.Nil(err)
|
||||
hs := NewHostStatsCollector(logger, cwd)
|
||||
|
|
|
@ -16,7 +16,7 @@ func TestVaultClient_TokenRenewals(t *testing.T) {
|
|||
v := testutil.NewTestVault(t)
|
||||
defer v.Stop()
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
v.Config.ConnectionRetryIntv = 100 * time.Millisecond
|
||||
v.Config.TaskTokenTTL = "4s"
|
||||
c, err := NewVaultClient(v.Config, logger, nil)
|
||||
|
@ -100,7 +100,7 @@ func TestVaultClient_Heap(t *testing.T) {
|
|||
conf.VaultConfig.Token = "testvaulttoken"
|
||||
conf.VaultConfig.TaskTokenTTL = "10s"
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
c, err := NewVaultClient(conf.VaultConfig, logger, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -203,7 +203,7 @@ func TestVaultClient_RenewNonRenewableLease(t *testing.T) {
|
|||
v := testutil.NewTestVault(t)
|
||||
defer v.Stop()
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
v.Config.ConnectionRetryIntv = 100 * time.Millisecond
|
||||
v.Config.TaskTokenTTL = "4s"
|
||||
c, err := NewVaultClient(v.Config, logger, nil)
|
||||
|
@ -252,7 +252,7 @@ func TestVaultClient_RenewNonexistentLease(t *testing.T) {
|
|||
v := testutil.NewTestVault(t)
|
||||
defer v.Stop()
|
||||
|
||||
logger := testlog.Logger(t)
|
||||
logger := testlog.HCLogger(t)
|
||||
v.Config.ConnectionRetryIntv = 100 * time.Millisecond
|
||||
v.Config.TaskTokenTTL = "4s"
|
||||
c, err := NewVaultClient(v.Config, logger, nil)
|
||||
|
|
Loading…
Reference in New Issue