Improve mirage modeling of allocations

Pending allocations never have tasks
This commit is contained in:
Michael Lange 2018-11-09 17:11:47 -08:00
parent 4e21366714
commit aa0cbadb30

View file

@ -156,9 +156,8 @@ export default Factory.extend({
namespace,
jobId: job.id,
nodeId: node.id,
taskStateIds: states.mapBy('id'),
task_state_ids: states.mapBy('id'),
taskResourcesIds: resources.mapBy('id'),
taskStateIds: allocation.clientStatus === 'pending' ? [] : states.mapBy('id'),
taskResourcesIds: allocation.clientStatus === 'pending' ? [] : resources.mapBy('id'),
taskGroup: taskGroup.name,
name: allocation.name || `${taskGroup.name}.[${faker.random.number(10)}]`,
});