From 5ad5bf63e44403d196a97670eb20645fc0b5957e Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 21 Feb 2016 17:59:12 -0800 Subject: [PATCH] nomad: fixing tests --- nomad/alloc_endpoint_test.go | 2 +- nomad/node_endpoint_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nomad/alloc_endpoint_test.go b/nomad/alloc_endpoint_test.go index b6ea20cd6..263dc7d4c 100644 --- a/nomad/alloc_endpoint_test.go +++ b/nomad/alloc_endpoint_test.go @@ -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) } }) diff --git a/nomad/node_endpoint_test.go b/nomad/node_endpoint_test.go index c670e93dd..de6a0e6cc 100644 --- a/nomad/node_endpoint_test.go +++ b/nomad/node_endpoint_test.go @@ -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) }