mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
* Regexy time simplification in task events * Oops, dont assume these are all task restart messages * Update mirage to provide displayMessage instead of message * Have a few acceptance tests look for .displayMessage instead of .message for equality now
22 lines
539 B
JavaScript
22 lines
539 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { Factory } from 'ember-cli-mirage';
|
|
import faker from 'nomad-ui/mirage/faker';
|
|
import { provide } from '../utils';
|
|
|
|
const REF_TIME = new Date();
|
|
const STATES = provide(10, faker.system.fileExt.bind(faker.system));
|
|
|
|
export default Factory.extend({
|
|
type: () => faker.helpers.randomize(STATES),
|
|
|
|
signal: () => '',
|
|
exitCode: () => null,
|
|
time: () => faker.date.past(2 / 365, REF_TIME) * 1000000,
|
|
|
|
displayMessage: () => faker.lorem.sentence(),
|
|
});
|