Fixup all the tests

This commit is contained in:
Nick O'Leary
2018-04-24 15:01:49 +01:00
parent 34832d5942
commit 5d064aa1d7
50 changed files with 3480 additions and 1762 deletions

View File

@@ -49,13 +49,15 @@ function publish(topic,data,retain) {
} else {
delete retained[topic];
}
connections.forEach(connection => connection.send(topic,data,retain))
connections.forEach(connection => connection.send(topic,data))
}
var api = module.exports = {
init: function(_runtime) {
runtime = _runtime;
connections = [];
retained = {};
runtime.events.removeListener("node-status",handleStatusEvent);
runtime.events.on("node-status",handleStatusEvent);
runtime.events.removeListener("runtime-event",handleRuntimeEvent);

View File

@@ -135,6 +135,7 @@ var api = module.exports = {
} else {
runtime.log.audit({event: "flow.get",id:opts.id,error:"not_found"});
var err = new Error();
err.code = "not_found";
err.status = 404;
return reject(err);
}