Add support for file upload in /nodes api

This commit is contained in:
Nick O'Leary
2020-08-13 15:54:54 +01:00
parent bcd85b11a1
commit 6f1ed76b4c
10 changed files with 185 additions and 17 deletions

View File

@@ -18,7 +18,7 @@ var should = require("should");
var sinon = require("sinon");
var when = require("when");
var path = require("path");
var fs = require('fs');
var fs = require('fs-extra');
var EventEmitter = require('events');
var NR_TEST_UTILS = require("nr-test-utils");
@@ -36,7 +36,7 @@ describe('nodes/registry/installer', function() {
warn: sinon.stub(),
info: sinon.stub(),
metric: sinon.stub(),
_: function() { return "abc"}
_: function(msg) { return msg }
}
beforeEach(function() {
@@ -70,8 +70,8 @@ describe('nodes/registry/installer', function() {
typeRegistry.getModuleInfo.restore();
}
if (require('fs').statSync.restore) {
require('fs').statSync.restore();
if (fs.statSync.restore) {
fs.statSync.restore();
}
});