From 1171c5f0f1b9184ad55bdba353edd8dfbd8b37e2 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Fri, 22 Apr 2016 16:49:19 -0700 Subject: [PATCH] expand the es client fixture --- test/fixtures/elasticsearch.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/fixtures/elasticsearch.js b/test/fixtures/elasticsearch.js index a38882f..798f468 100644 --- a/test/fixtures/elasticsearch.js +++ b/test/fixtures/elasticsearch.js @@ -1,6 +1,13 @@ import { uniqueId } from 'lodash'; -function Client() {} +function Client() { + this.indices = { + create: () => Promise.resolve({ acknowledged: true }) + }; + + this.transport = {}; +} + Client.prototype.index = function (params) { var shardCount = 2; return Promise.resolve({ @@ -13,6 +20,10 @@ Client.prototype.index = function (params) { }); }; +Client.prototype.ping = function () { + return Promise.resolve(); +}; + export default { Client: Client };