fix gelfAppender-test.js to reflect the above changes

This commit is contained in:
Jens John 2014-07-11 12:52:23 +09:00
parent 0f51ab1bb3
commit fcafed9a7e

View File

@ -115,10 +115,9 @@ vows.describe('log4js gelfAppender').addBatch({
return message; return message;
}, },
'should be in the gelf format': function(message) { 'should be in the gelf format': function(message) {
assert.equal(message.version, '1.0'); assert.equal(message.version, '1.1');
assert.equal(message.host, require('os').hostname()); assert.equal(message.host, require('os').hostname());
assert.equal(message.level, 6); //INFO assert.equal(message.level, 6); //INFO
assert.equal(message.facility, 'nodejs-server');
assert.equal(message.full_message, message.short_message); assert.equal(message.full_message, message.short_message);
assert.equal(message.full_message, 'This is a test'); assert.equal(message.full_message, 'This is a test');
} }
@ -246,7 +245,7 @@ vows.describe('log4js gelfAppender').addBatch({
}, },
'should pick up the options': function(message) { 'should pick up the options': function(message) {
assert.equal(message.host, 'cheese'); assert.equal(message.host, 'cheese');
assert.equal(message.facility, 'nonsense'); assert.equal(message._facility, 'nonsense');
assert.equal(message._every1, 'Hello every one'); // the default value assert.equal(message._every1, 'Hello every one'); // the default value
assert.equal(message._every2, 'Overwritten!'); // the overwritten value assert.equal(message._every2, 'Overwritten!'); // the overwritten value
assert.equal(message._myField, 'This is my field!'); // the value for this message only assert.equal(message._myField, 'This is my field!'); // the value for this message only