From 4134fcd2c7a4718fa3e2eae1b412f8f0fab74f36 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Thu, 31 May 2018 14:39:39 -0500 Subject: [PATCH] Fix test setup for FSMSnapshotRestore_Deployments to use a valid job that exists --- nomad/fsm_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nomad/fsm_test.go b/nomad/fsm_test.go index 0f8156de0..418fd7842 100644 --- a/nomad/fsm_test.go +++ b/nomad/fsm_test.go @@ -2570,6 +2570,12 @@ func TestFSM_SnapshotRestore_Deployments(t *testing.T) { state := fsm.State() d1 := mock.Deployment() d2 := mock.Deployment() + + j := mock.Job() + d1.JobID = j.ID + d2.JobID = j.ID + + state.UpsertJob(999, j) state.UpsertDeployment(1000, d1) state.UpsertDeployment(1001, d2)