allow id to be passed to mock elasticsearch index

This commit is contained in:
2016-04-25 14:43:53 -07:00
parent c819171393
commit 576f26a4b9

View File

@@ -15,7 +15,7 @@ Client.prototype.index = function (params) {
return Promise.resolve({ return Promise.resolve({
_index: params.index || 'index', _index: params.index || 'index',
_type: params.type || 'type', _type: params.type || 'type',
_id: uniqueId('testDoc'), _id: params.id || uniqueId('testDoc'),
_version: 1, _version: 1,
_shards: { total: shardCount, successful: shardCount, failed: 0 }, _shards: { total: shardCount, successful: shardCount, failed: 0 },
created: true created: true