open-vault/ui/mirage/factories/configuration.js
Jordan Reimer 7c7d626420
Raft peer removal bug (#13098)
* fixes issue removing raft peer via cli not reflected in UI until refresh

* adds changelog entry
2021-11-09 15:05:25 -07:00

28 lines
665 B
JavaScript

import { Factory, trait } from 'ember-cli-mirage';
import faker from 'faker';
export default Factory.extend({
auth: null,
data: null, // populated via traits
lease_duration: 0,
lease_id: '',
renewable: () => faker.datatype.boolean(),
request_id: () => faker.datatype.uuid(),
warnings: null,
wrap_info: null,
// add servers to test raft storage configuration
withRaft: trait({
afterCreate(config, server) {
if (!config.data) {
config.data = {
config: {
index: 0,
servers: server.serializerOrRegistry.serialize(server.createList('server', 2)),
},
};
}
},
}),
});