[5.x] Fix functional test runner merge (#11184)

* use correct index_already_exists error code for 5.x

* [status api] assume 5.x style responses
This commit is contained in:
Spencer 2017-04-12 10:06:46 -07:00 committed by GitHub
parent 335a3d77b5
commit 6feb7d64c9
3 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ export const createStubClient = (existingIndices = []) => ({
}),
create: sinon.spy(async ({ index }) => {
if (existingIndices.includes(index)) {
throw createEsClientError('resource_already_exists_exception');
throw createEsClientError('index_already_exists_exception');
} else {
existingIndices.push(index);
return { ok: true };

View file

@ -25,7 +25,7 @@ export function createCreateIndexStream({ client, stats, skipExisting }) {
});
stats.createdIndex(index, { settings });
} catch (err) {
if (get(err, 'body.error.type') !== 'resource_already_exists_exception' || attemptNumber >= 3) {
if (get(err, 'body.error.type') !== 'index_already_exists_exception' || attemptNumber >= 3) {
throw err;
}

View file

@ -7,6 +7,6 @@ export class KibanaServerVersion {
get = once(async () => {
const status = await this.kibanaStatus.get();
return status.version.number;
return status.version;
})
}