[Files] Fix flaky file creation and deletion tests (#141753)

* set has content to false

* [revert this] only run the flaky test

* remove .only
This commit is contained in:
Jean-Louis Leysens 2022-10-06 13:10:39 +02:00 committed by GitHub
parent def43c4b9d
commit 8219489639
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,11 +11,7 @@ import { createEsFileClient } from '../create_es_file_client';
import { FileClient } from '../types';
import { FileMetadata } from '../../../common';
/**
* This file client is using Elasticsearch interfaces directly to manage files.
*/
// FLAKY: https://github.com/elastic/kibana/issues/139565
describe.skip('ES-index-backed file client', () => {
describe('ES-index-backed file client', () => {
let esClient: TestEnvironmentUtils['esClient'];
let fileClient: FileClient;
let testHarness: TestEnvironmentUtils;
@ -197,6 +193,9 @@ describe.skip('ES-index-backed file client', () => {
})
);
await Promise.all([fileClient.delete({ id: id1 }), fileClient.delete({ id: id2 })]);
await Promise.all([
fileClient.delete({ id: id1, hasContent: false }),
fileClient.delete({ id: id2, hasContent: false }),
]);
});
});