tests now look for the 1.0 API by default

This commit is contained in:
Spencer Alger
2014-03-27 08:08:37 -07:00
parent 06648a84b4
commit ffea4eb478
3 changed files with 17 additions and 11 deletions

View File

@ -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 () {

View File

@ -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');