5875e4b15b
* Add consul-api-double under api * Update config to reflect api change * Remove consul-api-double as a dependency * api -> mock-api * Fixup mocks path for staging
31 lines
773 B
Plaintext
31 lines
773 B
Plaintext
${ env('CONSUL_ACLS_LEGACY', false) ? `rpc error making call: rpc: can't find method ACL.Method` : `
|
|
[
|
|
${
|
|
range(
|
|
env(
|
|
'CONSUL_IDP_COUNT',
|
|
Math.floor(
|
|
(
|
|
Math.random() * env('CONSUL_IDP_MAX', 10)
|
|
) + parseInt(env('CONSUL_IDP_MIN', 1))
|
|
)
|
|
)
|
|
).map(
|
|
function(item, i) {
|
|
const type = fake.helpers.randomize(['kubernetes']); // oidc
|
|
return `
|
|
{
|
|
"Name": "idp-${i}",
|
|
"Description": "${fake.lorem.sentence()}",
|
|
"Type": "${type}",
|
|
${ type === 'kubernetes' ? `"KubernetesHost": "https://${fake.internet.ip()}:8443",` : ``}
|
|
"CreateIndex": 10,
|
|
"ModifyIndex": 10
|
|
}
|
|
`
|
|
}
|
|
)
|
|
}
|
|
]
|
|
`}
|