From 80830221fe4e5a7c864fd4cf99a464964f23ffb1 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 24 Mar 2020 17:38:59 -0400 Subject: [PATCH] tests: fix TestAllocations_GarbageCollect --- client/alloc_endpoint_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/alloc_endpoint_test.go b/client/alloc_endpoint_test.go index 380099c41..6fd7a366e 100644 --- a/client/alloc_endpoint_test.go +++ b/client/alloc_endpoint_test.go @@ -216,10 +216,12 @@ func TestAllocations_GarbageCollect(t *testing.T) { a := mock.Alloc() a.Job.TaskGroups[0].Tasks[0].Driver = "mock_driver" - a.Job.TaskGroups[0].RestartPolicy = &nstructs.RestartPolicy{ + rp := &nstructs.RestartPolicy{ Attempts: 0, Mode: nstructs.RestartPolicyModeFail, } + a.Job.TaskGroups[0].RestartPolicy = rp + a.Job.TaskGroups[0].Tasks[0].RestartPolicy = rp a.Job.TaskGroups[0].Tasks[0].Config = map[string]interface{}{ "run_for": "10ms", }