Summary of changes:

- updated copyright
 - several tempalate changes for the docs
 - added a config for grunt-contrib-watch
 - updated nock commit number
 - fixed the coverage script
 - removed the export_docs script
 - added error message for legacy "es" users who don't have a version locked and have not upgraded
 - host will now add auth to urls created with `#makeUrl()`
 - Log class no longer looks for `config.loggers`
 - The log class now properly escapes single quotes in trace logs
 - Removed compiled yaml_tests.js from the repo
 - Yaml suite will only log error and warning messages unless the VERBOSE env var is set
 - createDefer is now a global setting, changed by modifying Transport.createDefer fubction
 - wrote tests for Content-Type checking
 - callbacks will now return the body and status of the request (if the request has completed) when an error occurs
 - Stdio logger now adds "Elasticsearch " to the front of log messages to distinguish it from other output to stdout.
This commit is contained in:
Spencer Alger
2013-12-15 14:08:29 -07:00
parent 0c8bd328fe
commit 37cd2f4f6c
20 changed files with 229 additions and 34803 deletions

View File

@ -188,7 +188,7 @@ describe('Http Connector', function () {
});
});
it('logs error events when an error occurs', function (done) {
it('does not log error events', function (done) {
var con = new HttpConnection(new Host('http://google.com'));
stub(con.log, 'error');
@ -205,8 +205,8 @@ describe('Http Connector', function () {
err.message.should.eql('actual error');
// logged the error and the trace log
con.log.error.callCount.should.eql(1);
con.log.trace.callCount.should.eql(1);
con.log.error.callCount.should.eql(0);
con.log.info.callCount.should.eql(0);
con.log.warning.callCount.should.eql(0);
con.log.debug.callCount.should.eql(0);
@ -227,9 +227,7 @@ describe('Http Connector', function () {
err.message.should.eql('actual error');
// logged the error
con.log.error.callCount.should.eql(1);
con.log.error.lastCall.args[0].message.should.eql('actual error');
con.log.error.callCount.should.eql(0);
done();
});
});
@ -250,13 +248,13 @@ describe('Http Connector', function () {
});
}
it('logs error event', function (done) {
it('does not log errors', function (done) {
var con = new HttpConnection(new Host('https://google.com'));
stub(con.log, 'error');
stub(https, 'request', makeStubReqWithMsgWhichErrorsMidBody());
con.request({}, function (err, resp, status) {
con.log.error.callCount.should.eql(1);
con.log.error.callCount.should.eql(0);
done();
});
});