Skip to content

Commit 8083022

Browse files
author
Mahmood Ali
committed
tests: fix TestAllocations_GarbageCollect
1 parent 55db937 commit 8083022

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/alloc_endpoint_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,12 @@ func TestAllocations_GarbageCollect(t *testing.T) {
216216

217217
a := mock.Alloc()
218218
a.Job.TaskGroups[0].Tasks[0].Driver = "mock_driver"
219-
a.Job.TaskGroups[0].RestartPolicy = &nstructs.RestartPolicy{
219+
rp := &nstructs.RestartPolicy{
220220
Attempts: 0,
221221
Mode: nstructs.RestartPolicyModeFail,
222222
}
223+
a.Job.TaskGroups[0].RestartPolicy = rp
224+
a.Job.TaskGroups[0].Tasks[0].RestartPolicy = rp
223225
a.Job.TaskGroups[0].Tasks[0].Config = map[string]interface{}{
224226
"run_for": "10ms",
225227
}

0 commit comments

Comments
 (0)