tests now look for the 1.0 API by default
This commit is contained in:
@ -54,6 +54,12 @@ var eventElementsPerBulk = eventsPerBulk * 2; // events are stored next to their
|
||||
function createIndex(indexName, done) {
|
||||
console.log('made index', indexName);
|
||||
var indexBody = {
|
||||
settings: {
|
||||
index: {
|
||||
number_of_shards: 1,
|
||||
number_of_replicas: 0
|
||||
}
|
||||
},
|
||||
mappings: {
|
||||
_default_: {
|
||||
properties: {
|
||||
|
||||
@ -21,20 +21,20 @@ describe('Client instances creation', function () {
|
||||
}).to.throwError(/previous "elasticsearch" module/);
|
||||
});
|
||||
|
||||
it('inherits the 0.90 API by default', function () {
|
||||
expect(client.bulk).to.eql(apis['0.90'].bulk);
|
||||
expect(client.cluster.nodeStats).to.eql(apis['0.90'].cluster.prototype.nodeStats);
|
||||
});
|
||||
|
||||
it('inherits the 1.0 API when specified', function () {
|
||||
client.close();
|
||||
client = es.Client({
|
||||
apiVersion: '1.0'
|
||||
});
|
||||
it('inherits the 1.0 API by default', function () {
|
||||
expect(client.bulk).to.eql(apis['1.0'].bulk);
|
||||
expect(client.nodes.stats).to.eql(apis['1.0'].nodes.prototype.stats);
|
||||
});
|
||||
|
||||
it('inherits the 0.90 API when specified', function () {
|
||||
client.close();
|
||||
client = es.Client({
|
||||
apiVersion: '0.90'
|
||||
});
|
||||
expect(client.bulk).to.eql(apis['0.90'].bulk);
|
||||
expect(client.cluster.nodeStats).to.eql(apis['0.90'].cluster.prototype.nodeStats);
|
||||
});
|
||||
|
||||
it('closing the client causes it\'s transport to be closed', function () {
|
||||
var called = false;
|
||||
client.transport.close = function () {
|
||||
|
||||
@ -371,7 +371,7 @@ describe('Http Connector', function () {
|
||||
|
||||
describe('Connection cleanup', function () {
|
||||
it('destroys any connections created', function (done) {
|
||||
this.timeout(4000);
|
||||
this.timeout(10000);
|
||||
var cp = require('child_process');
|
||||
var path = require('path');
|
||||
var es = require('event-stream');
|
||||
|
||||
Reference in New Issue
Block a user