Fix api call

This commit is contained in:
delvedor
2019-07-10 16:35:34 +02:00
parent 1810f5f0c3
commit d7fc4f7b03

View File

@ -111,7 +111,7 @@ class TestRunner {
const { body } = await this.client.xpack.security.getRole() const { body } = await this.client.xpack.security.getRole()
const roles = Object.keys(body).filter(n => helper.esDefaultRoles.indexOf(n) === -1) const roles = Object.keys(body).filter(n => helper.esDefaultRoles.indexOf(n) === -1)
await helper.runInParallel( await helper.runInParallel(
this.client, 'security.xpack.deleteRole', this.client, 'xpack.security.deleteRole',
roles.map(r => ({ name: r })) roles.map(r => ({ name: r }))
) )
} catch (err) { } catch (err) {
@ -239,12 +239,12 @@ class TestRunner {
// Some xpack test requires this user // Some xpack test requires this user
this.tap.comment('Creating x-pack user') this.tap.comment('Creating x-pack user')
try { try {
await this.client.security.putUser({ await this.client.xpack.security.putUser({
username: 'x_pack_rest_user', username: 'x_pack_rest_user',
body: { password: 'x-pack-test-password', roles: ['superuser'] } body: { password: 'x-pack-test-password', roles: ['superuser'] }
}) })
} catch (err) { } catch (err) {
this.tap.error(err, 'should not error: security.putUser') this.tap.error(err, 'should not error: xpack.security.putUser')
} }
} }