NLS Core nodes

NLS exec node

NLS function/temple/delay nodes

NLS function/template/delay/trigger/comment nodes

NLS io nodes (mqtt/httpin/websocket/watch/serial)

NLS messages.json for tcpin

NLS io nodes (tcpin & udp half)

NLS io nodes (udp)

NLS logic nodes (switch/change)

NLS logic (range) and parsers (csv&html) nodes

NLS parser nodes (json/xml)

NLS test case update for logic/parsers

NLS analysis and hardware nodes

NLS storage nodes (file/redisout/mongodb) and test

NLS storage node (tail)

NLS social nodes (feedparse/email/irc)

NLS socal node (twitter half change)

NLS social node (twitter) and core node (unknown)
This commit is contained in:
Scott Yoshizawa
2015-05-10 15:47:22 -05:00
committed by Nick O'Leary
parent c105b2df37
commit 2fe859b111
49 changed files with 1903 additions and 1159 deletions

View File

@@ -489,7 +489,7 @@ describe('websocket Node', function() {
});
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("Missing server configuration");
logEvents[0][0].msg.toString().should.startWith("websocket.errors.missing-conf");
done();
});
});
@@ -505,7 +505,7 @@ describe('websocket Node', function() {
//console.log(logEvents);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("Missing server configuration");
logEvents[0][0].msg.toString().should.startWith("websocket.errors.missing-conf");
done();
});
});

View File

@@ -134,7 +134,7 @@ describe('range Node', function() {
var sinon = require('sinon');
sinon.stub(rangeNode1, 'log', function(log) {
if(log.indexOf("Not a number") > -1) {
if(log.indexOf("notnumber") > -1) {
done();
} else {
try {

View File

@@ -254,9 +254,9 @@ describe('CSV node', function() {
});
logEvents.should.have.length(2);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith('This node only handles csv strings or js objects.');
logEvents[0][0].msg.toString().should.startWith('csv.errors.csv_js');
logEvents[1][0].should.have.a.property('msg');
logEvents[1][0].msg.toString().should.startWith('This node only handles csv strings or js objects.');
logEvents[1][0].msg.toString().should.startWith('csv.errors.csv_js');
done();
} catch(err) {
done(err);

View File

@@ -105,13 +105,13 @@ describe('JSON node', function() {
//console.log(logEvents);
logEvents.should.have.length(4);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith('Dropped: ');
logEvents[0][0].msg.toString().should.startWith('json.errors.dropped: ');
logEvents[1][0].should.have.a.property('msg');
logEvents[1][0].msg.toString().should.startWith('Dropped: ');
logEvents[1][0].msg.toString().should.startWith('json.errors.dropped: ');
logEvents[2][0].should.have.a.property('msg');
logEvents[2][0].msg.toString().should.startWith('Dropped: ');
logEvents[2][0].msg.toString().should.startWith('json.errors.dropped: ');
logEvents[3][0].should.have.a.property('msg');
logEvents[3][0].msg.toString().should.startWith('Dropped: ');
logEvents[3][0].msg.toString().should.startWith('json.errors.dropped: ');
done();
} catch(err) {
done(err);

View File

@@ -111,7 +111,7 @@ describe('XML node', function() {
return evt[0].type == "xml";
});
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg',"This node only handles xml strings or js objects.");
logEvents[0][0].should.have.a.property('msg',"xml.errors.xml_js");
done();
} catch(err) {
done(err);

View File

@@ -133,7 +133,7 @@ describe('file Nodes', function() {
//console.log(logEvents);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.equal("No filename specified");
logEvents[0][0].msg.toString().should.equal("file.errors.nofilename");
done();
}
},wait);
@@ -180,7 +180,7 @@ describe('file Nodes', function() {
//console.log(logEvents);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("failed to write");
logEvents[0][0].msg.toString().should.startWith("file.errors.writefail");
done();
}
catch(e) { done(e); }
@@ -205,7 +205,7 @@ describe('file Nodes', function() {
//console.log(logEvents);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("failed to append");
logEvents[0][0].msg.toString().should.startWith("file.errors.appendfail");
done();
}
catch(e) { done(e); }
@@ -230,7 +230,7 @@ describe('file Nodes', function() {
//console.log(logEvents);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("failed to delete");
logEvents[0][0].msg.toString().should.startWith("file.errors.deletefail");
done();
}
catch(e) { done(e); }
@@ -318,7 +318,7 @@ describe('file Nodes', function() {
});
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.startWith("Warning: msg ");
logEvents[0][0].msg.toString().should.startWith("file.errors.nooverride");
done();
});
n1.receive({payload:"",filename:"foo.txt"});
@@ -335,7 +335,7 @@ describe('file Nodes', function() {
});
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.equal("No filename specified");
logEvents[0][0].msg.toString().should.equal("file.errors.nofilename");
done();
},wait);
n1.receive({});
@@ -350,9 +350,11 @@ describe('file Nodes', function() {
var logEvents = helper.log().args.filter(function(evt) {
return evt[0].type == "file in";
});
console.log(logEvents[0][0].msg);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.equal("Error: ENOENT, open 'badfile'");
//logEvents[0][0].msg.toString().should.equal("Error: ENOENT, open 'badfile'");
logEvents[0][0].msg.toString().should.startWith("Error: ENOENT, open");
done();
},wait);
n1.receive({payload:""});