Summary of Changes:

- moved es install/start/stop logic into a seperate script
  - `grunt test` now runs the integration tests once for each version of ES we support
  - grunt can now install and run elasticearch (using grunt-run, pure js solution coming later)
  - included seperate es.sh script specifically for starting or stopping elasticsearch
  - url aliases, api, yaml_suite/index.js, and yaml_tests.json, are all now duplicated for 0_90 support
  - the client now accepts an apiVersion argument (undocumented) which defaults to 'master' but can be '0.90'
  - The yaml test runner will now check the name of the ES instance it is connecting to, preventing accidental wiping of ES
This commit is contained in:
Spencer Alger
2014-01-14 23:10:12 -07:00
parent 37ce4e440c
commit 18e134d0a6
30 changed files with 23318 additions and 560 deletions

View File

@ -57,7 +57,7 @@ describe('Http Connector', function () {
});
it('expects the host to have a protocol of http or https', function () {
(function () {
expect(function () {
var con = new HttpConnection(new Host('thrifty://es.com/stuff'));
}).to.throwError(/invalid protocol/i);
});
@ -172,9 +172,9 @@ describe('Http Connector', function () {
it('calls http based on the host', function (done) {
var con = new HttpConnection(new Host('http://google.com'));
con.request({}, function () {
http.request.callCount.should.eql(1);
https.request.callCount.should.eql(0);
http.request.lastCall.args[0].agent.should.be.an.instanceOf(KeepAliveAgent);
expect(http.request.callCount).to.be(1);
expect(https.request.callCount).to.be(0);
expect(http.request.lastCall.args[0].agent).to.be.a(KeepAliveAgent);
done();
});
});
@ -182,9 +182,9 @@ describe('Http Connector', function () {
it('calls https based on the host', function (done) {
var con = new HttpConnection(new Host('https://google.com'));
con.request({}, function () {
http.request.callCount.should.eql(0);
https.request.callCount.should.eql(1);
https.request.lastCall.args[0].agent.should.be.an.instanceOf(KeepAliveAgent.HttpsAgent);
expect(http.request.callCount).to.be(0);
expect(https.request.callCount).to.be(1);
expect(https.request.lastCall.args[0].agent).to.be.a(KeepAliveAgent.HttpsAgent);
done();
});
});