Skip to content

Commit

Permalink
Revert "revert code removal, apparently was used (?)"
Browse files Browse the repository at this point in the history
This reverts commit 6948185
  • Loading branch information
pgayvallet committed Aug 26, 2020
1 parent 141cd83 commit 3ab16bf
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/core/server/ui_settings/integration_tests/lib/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ interface AllServices {
savedObjectsClient: SavedObjectsClientContract;
callCluster: LegacyAPICaller;
uiSettings: IUiSettingsClient;
deleteKibanaIndex: typeof deleteKibanaIndex;
}

let services: AllServices;
Expand All @@ -62,20 +61,6 @@ export async function startServers() {
kbnServer = kbn.kbnServer;
}

async function deleteKibanaIndex(callCluster: LegacyAPICaller) {
const kibanaIndices = await callCluster('cat.indices', { index: '.kibana*', format: 'json' });
const indexNames = kibanaIndices.map((x: any) => x.index);
if (!indexNames.length) {
return;
}
await callCluster('indices.putSettings', {
index: indexNames,
body: { index: { blocks: { read_only: false } } },
});
await callCluster('indices.delete', { index: indexNames });
return indexNames;
}

export function getServices() {
if (services) {
return services;
Expand All @@ -97,7 +82,6 @@ export function getServices() {
callCluster,
savedObjectsClient,
uiSettings,
deleteKibanaIndex,
};

return services;
Expand Down

0 comments on commit 3ab16bf

Please sign in to comment.