expand the es client fixture
This commit is contained in:
13
test/fixtures/elasticsearch.js
vendored
13
test/fixtures/elasticsearch.js
vendored
@@ -1,6 +1,13 @@
|
|||||||
import { uniqueId } from 'lodash';
|
import { uniqueId } from 'lodash';
|
||||||
|
|
||||||
function Client() {}
|
function Client() {
|
||||||
|
this.indices = {
|
||||||
|
create: () => Promise.resolve({ acknowledged: true })
|
||||||
|
};
|
||||||
|
|
||||||
|
this.transport = {};
|
||||||
|
}
|
||||||
|
|
||||||
Client.prototype.index = function (params) {
|
Client.prototype.index = function (params) {
|
||||||
var shardCount = 2;
|
var shardCount = 2;
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
@@ -13,6 +20,10 @@ Client.prototype.index = function (params) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Client.prototype.ping = function () {
|
||||||
|
return Promise.resolve();
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Client: Client
|
Client: Client
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user