Delete dead indices.delete code from v1 migrations (#89059)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Rudolf Meijering 2021-01-26 14:16:08 +01:00 committed by GitHub
parent c74a2b25a6
commit dcba2ab829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 17 deletions

View file

@ -18,7 +18,7 @@ export interface CallCluster {
(path: 'bulk', opts: { body: object[] }): Promise<BulkResult>;
(path: 'count', opts: CountOpts): Promise<{ count: number; _shards: ShardsInfo }>;
(path: 'clearScroll', opts: { scrollId: string }): Promise<any>;
(path: 'indices.create' | 'indices.delete', opts: IndexCreationOpts): Promise<any>;
(path: 'indices.create', opts: IndexCreationOpts): Promise<any>;
(path: 'indices.exists', opts: IndexOpts): Promise<boolean>;
(path: 'indices.existsAlias', opts: { name: string }): Promise<boolean>;
(path: 'indices.get', opts: IndexOpts & Ignorable): Promise<IndicesInfo | NotFound>;

View file

@ -107,17 +107,6 @@ describe('ElasticIndex', () => {
});
});
describe('deleteIndex', () => {
test('calls indices.delete', async () => {
await Index.deleteIndex(client, '.lotr');
expect(client.indices.delete).toHaveBeenCalledTimes(1);
expect(client.indices.delete).toHaveBeenCalledWith({
index: '.lotr',
});
});
});
describe('claimAlias', () => {
test('handles unaliased indices', async () => {
client.indices.getAlias.mockResolvedValue(

View file

@ -221,10 +221,6 @@ export async function createIndex(
});
}
export async function deleteIndex(client: MigrationEsClient, index: string) {
await client.indices.delete({ index });
}
/**
* Converts an index to an alias. The `alias` parameter is the desired alias name which currently
* is a concrete index. This function will reindex `alias` into a new index, delete the `alias`

View file

@ -20,7 +20,6 @@ const methods = [
'clearScroll',
'count',
'indices.create',
'indices.delete',
'indices.deleteTemplate',
'indices.get',
'indices.getAlias',