2023-04-10 15:36:59 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2019-09-26 18:47:07 +00:00
|
|
|
import { Factory } from 'ember-cli-mirage';
|
2019-10-03 14:13:08 +00:00
|
|
|
import faker from 'nomad-ui/mirage/faker';
|
2017-09-19 14:47:10 +00:00
|
|
|
import { provide } from '../utils';
|
|
|
|
|
|
|
|
const REF_TIME = new Date();
|
|
|
|
const STATES = provide(10, faker.system.fileExt.bind(faker.system));
|
|
|
|
|
|
|
|
export default Factory.extend({
|
2019-09-30 14:44:22 +00:00
|
|
|
type: () => faker.helpers.randomize(STATES),
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
signal: () => '',
|
|
|
|
exitCode: () => null,
|
|
|
|
time: () => faker.date.past(2 / 365, REF_TIME) * 1000000,
|
|
|
|
|
2018-03-28 19:52:02 +00:00
|
|
|
displayMessage: () => faker.lorem.sentence(),
|
2017-09-19 14:47:10 +00:00
|
|
|
});
|