Skip to content

Commit

Permalink
Fix type failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf committed Aug 26, 2021
1 parent aeaea19 commit 566d305
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,26 +137,3 @@ function createRoot(options: { batchSizeBytes?: number }) {
}
);
}

async function fetchDocs(esClient: ElasticsearchClient, index: string, type: string) {
const { body } = await esClient.search<any>({
index,
size: 10000,
body: {
query: {
bool: {
should: [
{
term: { type },
},
],
},
},
},
});

return body.hits.hits.map((h) => ({
...h._source,
id: h._id,
}));
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ import fs from 'fs/promises';
import JSON5 from 'json5';
import * as kbnTestServer from '../../../../test_helpers/kbn_server';
import { Root } from '../../../root';
import { ElasticsearchClient } from '../../../elasticsearch';
import { Env } from '@kbn/config';
import { REPO_ROOT } from '@kbn/utils';
import { getEnvOptions } from '../../../config/mocks';

const kibanaVersion = Env.createDefault(REPO_ROOT, getEnvOptions()).packageInfo.version;
const targetIndex = `.kibana_${kibanaVersion}_001`;
const logFilePath = Path.join(__dirname, 'batch_size_bytes_exceeds_es_content_length.log');

async function removeLogFile() {
Expand Down Expand Up @@ -115,26 +109,3 @@ function createRoot(options: { batchSizeBytes?: number }) {
}
);
}

async function fetchDocs(esClient: ElasticsearchClient, index: string, type: string) {
const { body } = await esClient.search<any>({
index,
size: 10000,
body: {
query: {
bool: {
should: [
{
term: { type },
},
],
},
},
},
});

return body.hits.hits.map((h) => ({
...h._source,
id: h._id,
}));
}

0 comments on commit 566d305

Please sign in to comment.