2021-11-08 21:29:00 +00:00
|
|
|
import { Factory } from 'ember-cli-mirage';
|
|
|
|
|
|
|
|
export default Factory.extend({
|
2022-01-25 20:27:26 +00:00
|
|
|
path: 'foo/',
|
|
|
|
description: 'secret-engine generated by mirage',
|
|
|
|
local: true,
|
|
|
|
sealWrap: true,
|
2021-11-08 21:29:00 +00:00
|
|
|
// set in afterCreate
|
2022-01-25 20:27:26 +00:00
|
|
|
accessor: 'type_7f52940',
|
|
|
|
type: 'kv',
|
2021-11-08 21:29:00 +00:00
|
|
|
options: null,
|
|
|
|
|
|
|
|
afterCreate(secretEngine) {
|
|
|
|
if (!secretEngine.options && ['generic', 'kv'].includes(secretEngine.type)) {
|
|
|
|
secretEngine.options = {
|
2022-01-25 20:27:26 +00:00
|
|
|
version: '2',
|
2021-11-08 21:29:00 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|