ce0ffdd077
Co-authored-by: Mike Nomitch <mail@mikenomitch.com>
24 lines
483 B
JavaScript
24 lines
483 B
JavaScript
import { Factory } from 'ember-cli-mirage';
|
|
import faker from 'nomad-ui/mirage/faker';
|
|
|
|
export default Factory.extend({
|
|
id: () => faker.hacker.verb(),
|
|
name() {
|
|
return this.id;
|
|
},
|
|
description: () => (faker.random.number(10) >= 2 ? faker.lorem.sentence() : null),
|
|
rules: `# Allow read only access to the default namespace
|
|
namespace "default" {
|
|
policy = "read"
|
|
}
|
|
|
|
node {
|
|
policy = "read"
|
|
}`,
|
|
rulesJSON: () => ({
|
|
Node: {
|
|
Policy: 'read',
|
|
},
|
|
}),
|
|
});
|