[Reporting] Unskip ILM migration tests (#110813)

* added allow restricted indices to privileges check

* updated comment -> TODO

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Jean-Louis Leysens 2021-09-03 11:22:26 +02:00 committed by GitHub
parent 33c124b9d8
commit 0b5f1c0d9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import { errors } from '@elastic/elasticsearch';
import { SecurityHasPrivilegesIndexPrivilegesCheck } from '@elastic/elasticsearch/api/types';
import { RequestHandler } from 'src/core/server';
import {
API_MIGRATE_ILM_POLICY_URL,
@ -36,10 +37,11 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log
const { body } = await elasticsearch.client.asCurrentUser.security.hasPrivileges({
body: {
index: [
{
({
privileges: ['manage'], // required to do anything with the reporting indices
names: [store.getReportingIndexPattern()],
},
allow_restricted_indices: true,
} as unknown) as SecurityHasPrivilegesIndexPrivilegesCheck, // TODO: Needed until `allow_restricted_indices` is added to the types.
],
},
});

View file

@ -20,8 +20,7 @@ export default function ({ getService }: FtrProviderContext) {
const reportingAPI = getService('reportingAPI');
const security = getService('security');
// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/110483
describe.skip('ILM policy migration APIs', () => {
describe('ILM policy migration APIs', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');