From 497ff611f8be7921e797b74716472c528fd971b0 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 16 Dec 2016 10:21:56 -0800 Subject: [PATCH] fix tests --- nomad/job_endpoint_test.go | 1 + nomad/node_endpoint_test.go | 2 ++ nomad/state/state_store_test.go | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/nomad/job_endpoint_test.go b/nomad/job_endpoint_test.go index 1bbcca85a..17cbc3211 100644 --- a/nomad/job_endpoint_test.go +++ b/nomad/job_endpoint_test.go @@ -1132,6 +1132,7 @@ func TestJobEndpoint_GetJobSummary(t *testing.T) { Summary: map[string]structs.TaskGroupSummary{ "web": structs.TaskGroupSummary{}, }, + Children: new(structs.JobChildrenSummary), CreateIndex: job.CreateIndex, ModifyIndex: job.CreateIndex, } diff --git a/nomad/node_endpoint_test.go b/nomad/node_endpoint_test.go index d1882824b..be114acab 100644 --- a/nomad/node_endpoint_test.go +++ b/nomad/node_endpoint_test.go @@ -731,6 +731,7 @@ func TestClientEndpoint_Drain_Down(t *testing.T) { Lost: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: jobResp.JobModifyIndex, ModifyIndex: summary.ModifyIndex, } @@ -749,6 +750,7 @@ func TestClientEndpoint_Drain_Down(t *testing.T) { Lost: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: jobResp1.JobModifyIndex, ModifyIndex: summary1.ModifyIndex, } diff --git a/nomad/state/state_store_test.go b/nomad/state/state_store_test.go index 6847cb6b9..5c756290b 100644 --- a/nomad/state/state_store_test.go +++ b/nomad/state/state_store_test.go @@ -2008,6 +2008,7 @@ func TestStateStore_UpdateMultipleAllocsFromClient(t *testing.T) { Starting: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: 999, ModifyIndex: 1001, } @@ -2356,6 +2357,7 @@ func TestStateStore_JobSummary(t *testing.T) { Running: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: 900, ModifyIndex: 930, } @@ -2406,6 +2408,7 @@ func TestStateStore_JobSummary(t *testing.T) { Summary: map[string]structs.TaskGroupSummary{ "web": structs.TaskGroupSummary{}, }, + Children: new(structs.JobChildrenSummary), CreateIndex: 1000, ModifyIndex: 1000, } @@ -2539,6 +2542,7 @@ func TestStateStore_UpdateAlloc_JobNotPresent(t *testing.T) { Summary: map[string]structs.TaskGroupSummary{ "web": structs.TaskGroupSummary{}, }, + Children: new(structs.JobChildrenSummary), CreateIndex: 500, ModifyIndex: 500, } @@ -3166,6 +3170,7 @@ func TestStateJobSummary_UpdateJobCount(t *testing.T) { Starting: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: 1000, ModifyIndex: 1001, } @@ -3195,6 +3200,7 @@ func TestStateJobSummary_UpdateJobCount(t *testing.T) { Starting: 3, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: job.CreateIndex, ModifyIndex: outA.ModifyIndex, } @@ -3227,6 +3233,7 @@ func TestStateJobSummary_UpdateJobCount(t *testing.T) { Starting: 1, }, }, + Children: new(structs.JobChildrenSummary), CreateIndex: job.CreateIndex, ModifyIndex: outA.ModifyIndex, }