diff --git a/test/integration/test-runner.js b/test/integration/test-runner.js index 959473a24..d73683c7b 100644 --- a/test/integration/test-runner.js +++ b/test/integration/test-runner.js @@ -75,11 +75,7 @@ function build (opts = {}) { } try { - const { body: templates } = await client.indices.getTemplate() - await helper.runInParallel( - client, 'indices.deleteTemplate', - Object.keys(templates).map(t => ({ name: t })) - ) + await client.indices.deleteTemplate({ name: '*' }) } catch (err) { assert.ifError(err, 'should not error: indices.deleteTemplate') } @@ -87,12 +83,7 @@ function build (opts = {}) { try { const { body: repositories } = await client.snapshot.getRepository() for (const repository of Object.keys(repositories)) { - const { body: snapshots } = await client.snapshot.get({ repository, snapshot: '_all' }) - await helper.runInParallel( - client, 'snapshot.delete', - Object.keys(snapshots).map(snapshot => ({ snapshot, repository })), - { ignore: [404] } - ) + await client.snapshot.delete({ repository, snapshot: '*' }, { ignore: [404] }) await client.snapshot.deleteRepository({ repository }, { ignore: [404] }) } } catch (err) {