nomad: fixing tests

This commit is contained in:
Armon Dadgar 2016-02-21 17:59:12 -08:00
parent 0e1f9a3def
commit 74fb2d5a65
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ func TestAllocEndpoint_List_Blocking(t *testing.T) {
alloc2.ID = alloc.ID
alloc2.ClientStatus = structs.AllocClientStatusRunning
time.AfterFunc(100*time.Millisecond, func() {
if err := state.UpdateAllocFromClient(3, alloc2); err != nil {
if err := state.UpdateAllocsFromClient(3, []*structs.Allocation{alloc2}); err != nil {
t.Fatalf("err: %v", err)
}
})

View File

@ -755,7 +755,7 @@ func TestClientEndpoint_GetAllocs_Blocking(t *testing.T) {
allocUpdate.NodeID = alloc.NodeID
allocUpdate.ID = alloc.ID
allocUpdate.ClientStatus = structs.AllocClientStatusRunning
err := state.UpdateAllocFromClient(200, allocUpdate)
err := state.UpdateAllocsFromClient(200, []*structs.Allocation{allocUpdate})
if err != nil {
t.Fatalf("err: %v", err)
}