Add TaskStates to mock.Alloc. Fixes some test race conditions

This commit is contained in:
Alex Dadgar
2015-12-20 17:30:45 -08:00
parent 2de95e087e
commit 8d25368462

View File

@@ -235,6 +235,11 @@ func Alloc() *structs.Allocation {
},
},
},
TaskStates: map[string]*structs.TaskState{
"web": &structs.TaskState{
State: structs.TaskStatePending,
},
},
Job: Job(),
DesiredStatus: structs.AllocDesiredStatusRun,
ClientStatus: structs.AllocClientStatusPending,