Fix TestRktDriver_PortsMapping and TestAgent_LoadKeyrings
This commit is contained in:
parent
6a4efbf3b2
commit
cb187ffce6
|
@ -445,13 +445,16 @@ func TestRktDriver_PortsMapping(t *testing.T) {
|
|||
if handle == nil {
|
||||
t.Fatalf("missing handle")
|
||||
}
|
||||
defer handle.Kill()
|
||||
|
||||
go func() {
|
||||
time.Sleep(1 * time.Second)
|
||||
if err := handle.Kill(); err != nil {
|
||||
t.Fatalf("Failed to kill handle: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
select {
|
||||
case res := <-handle.WaitCh():
|
||||
if !res.Successful() {
|
||||
t.Fatalf("err: %v", res)
|
||||
}
|
||||
case <-handle.WaitCh():
|
||||
case <-time.After(time.Duration(testutil.TestMultiplier()*15) * time.Second):
|
||||
t.Fatalf("timeout")
|
||||
}
|
||||
|
|
|
@ -43,6 +43,10 @@ func makeAgent(t testing.TB, cb func(*Config)) (string, *Agent) {
|
|||
config := nomad.DefaultConfig()
|
||||
conf.NomadConfig = config
|
||||
|
||||
// Set the data_dir
|
||||
conf.DataDir = dir
|
||||
conf.NomadConfig.DataDir = dir
|
||||
|
||||
// Bind and set ports
|
||||
conf.BindAddr = "127.0.0.1"
|
||||
conf.Ports = &Ports{
|
||||
|
|
Loading…
Reference in New Issue