mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
First pass of projects test coverage
This commit is contained in:
@@ -968,6 +968,7 @@ function init(_settings, _runtime) {
|
||||
runtime = _runtime;
|
||||
log = runtime.log;
|
||||
projectsDir = fspath.join(settings.userDir,"projects");
|
||||
authCache.init();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@@ -17,6 +17,9 @@
|
||||
var authCache = {}
|
||||
|
||||
module.exports = {
|
||||
init: function() {
|
||||
authCache = {};
|
||||
},
|
||||
clear: function(project,remote, user) {
|
||||
if (user && remote && authCache[project] && authCache[project][remote]) {
|
||||
delete authCache[project][remote][user];
|
||||
|
@@ -36,7 +36,7 @@ function getListenPath() {
|
||||
|
||||
var ResponseServer = function(auth) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
server = net.createServer(function(connection) {
|
||||
var server = net.createServer(function(connection) {
|
||||
connection.setEncoding('utf8');
|
||||
var parts = [];
|
||||
connection.on('data', function(data) {
|
||||
@@ -81,7 +81,7 @@ var ResponseServer = function(auth) {
|
||||
|
||||
var ResponseSSHServer = function(auth) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
server = net.createServer(function(connection) {
|
||||
var server = net.createServer(function(connection) {
|
||||
connection.setEncoding('utf8');
|
||||
var parts = [];
|
||||
connection.on('data', function(data) {
|
||||
@@ -93,6 +93,7 @@ var ResponseSSHServer = function(auth) {
|
||||
console.log("LINE:",line);
|
||||
parts = [];
|
||||
if (line==='The') {
|
||||
// TODO: document these exchanges!
|
||||
connection.end('yes');
|
||||
// server.close();
|
||||
} else if (line === 'Enter') {
|
||||
|
Reference in New Issue
Block a user