From 8f7fde9da0b3db775328a055cf9505e48af35444 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 1 Feb 2018 07:56:49 +1100 Subject: [PATCH] fix(test): sandboxed-module -> log4js-node version --- test/sandbox-coverage.js | 2 +- test/tap/configuration-test.js | 2 +- test/tap/configuration-validation-test.js | 4 +--- test/tap/consoleAppender-test.js | 2 +- test/tap/default-settings-test.js | 2 +- test/tap/file-sighup-test.js | 2 +- test/tap/fileAppender-test.js | 2 +- test/tap/gelfAppender-test.js | 2 +- test/tap/hipchatAppender-test.js | 2 +- test/tap/logFaces-HTTP-test.js | 2 +- test/tap/logFaces-UDP-test.js | 2 +- test/tap/logging-test.js | 2 +- test/tap/logglyAppender-test.js | 2 +- test/tap/logstashHTTP-test.js | 2 +- test/tap/logstashUDP-test.js | 2 +- test/tap/mailgunAppender-test.js | 2 +- test/tap/multiprocess-shutdown-test.js | 2 +- test/tap/multiprocess-test.js | 2 +- test/tap/rabbitmqAppender-test.js | 2 +- test/tap/redisAppender-test.js | 2 +- test/tap/slackAppender-test.js | 2 +- test/tap/smtpAppender-test.js | 2 +- test/tap/stderrAppender-test.js | 2 +- test/tap/stdoutAppender-test.js | 2 +- 24 files changed, 24 insertions(+), 26 deletions(-) diff --git a/test/sandbox-coverage.js b/test/sandbox-coverage.js index 8be97c8..7604fab 100644 --- a/test/sandbox-coverage.js +++ b/test/sandbox-coverage.js @@ -1,6 +1,6 @@ 'use strict'; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); sandbox.configure({ sourceTransformers: { diff --git a/test/tap/configuration-test.js b/test/tap/configuration-test.js index 5b0576d..feac5c1 100644 --- a/test/tap/configuration-test.js +++ b/test/tap/configuration-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('log4js configure', (batch) => { batch.test('when configuration file loaded via LOG4JS_CONFIG env variable', (t) => { diff --git a/test/tap/configuration-validation-test.js b/test/tap/configuration-validation-test.js index 00e08dc..c1b0a4b 100644 --- a/test/tap/configuration-validation-test.js +++ b/test/tap/configuration-validation-test.js @@ -10,7 +10,7 @@ const debug = require('debug')('log4js:test.configuration-validation'); const testAppender = (label, result) => ({ configure: function (config, layouts, findAppender) { - debug(`testAppender(${label}).configure called`); + debug(`testAppender(${label}).configure called, with config: ${util.inspect(config)}`); result.configureCalled = true; result.type = config.type; result.label = label; @@ -334,8 +334,6 @@ test('log4js configuration validation', (batch) => { t.type(result.layouts.basicLayout, 'function'); t.type(result.findAppender, 'function'); t.type(result.findAppender('thing2'), 'object'); - debug(`thing2: ${util.inspect(result.findAppender('thing2'))}`); - t.type(result.findAppender('thing2').type, 'notCheese'); t.end(); }); diff --git a/test/tap/consoleAppender-test.js b/test/tap/consoleAppender-test.js index 499f2d3..50293c9 100644 --- a/test/tap/consoleAppender-test.js +++ b/test/tap/consoleAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('log4js console appender', (batch) => { batch.test('should output to console', (t) => { diff --git a/test/tap/default-settings-test.js b/test/tap/default-settings-test.js index ee1c275..3538721 100644 --- a/test/tap/default-settings-test.js +++ b/test/tap/default-settings-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('default settings', (t) => { const output = []; diff --git a/test/tap/file-sighup-test.js b/test/tap/file-sighup-test.js index f863851..7448ae6 100644 --- a/test/tap/file-sighup-test.js +++ b/test/tap/file-sighup-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('file appender SIGHUP', (t) => { let closeCalled = 0; diff --git a/test/tap/fileAppender-test.js b/test/tap/fileAppender-test.js index 39b0394..1cc9f94 100644 --- a/test/tap/fileAppender-test.js +++ b/test/tap/fileAppender-test.js @@ -3,7 +3,7 @@ const test = require('tap').test; const fs = require('fs'); const path = require('path'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const log4js = require('../../lib/log4js'); const zlib = require('zlib'); const EOL = require('os').EOL || '\n'; diff --git a/test/tap/gelfAppender-test.js b/test/tap/gelfAppender-test.js index b473ee4..7ea72c2 100644 --- a/test/tap/gelfAppender-test.js +++ b/test/tap/gelfAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const realLayouts = require('../../lib/layouts'); const setupLogging = function (options, category, compressedLength) { diff --git a/test/tap/hipchatAppender-test.js b/test/tap/hipchatAppender-test.js index 2d58687..09f92fd 100644 --- a/test/tap/hipchatAppender-test.js +++ b/test/tap/hipchatAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const lastRequest = {}; diff --git a/test/tap/logFaces-HTTP-test.js b/test/tap/logFaces-HTTP-test.js index 05df419..56e73ad 100644 --- a/test/tap/logFaces-HTTP-test.js +++ b/test/tap/logFaces-HTTP-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const fakeAxios = { diff --git a/test/tap/logFaces-UDP-test.js b/test/tap/logFaces-UDP-test.js index a5f0fa8..82743d3 100644 --- a/test/tap/logFaces-UDP-test.js +++ b/test/tap/logFaces-UDP-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const fakeDgram = { diff --git a/test/tap/logging-test.js b/test/tap/logging-test.js index 554f9d1..30c8215 100644 --- a/test/tap/logging-test.js +++ b/test/tap/logging-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const recording = require('../../lib/appenders/recording'); test('log4js', (batch) => { diff --git a/test/tap/logglyAppender-test.js b/test/tap/logglyAppender-test.js index 400a4b8..f0606d4 100644 --- a/test/tap/logglyAppender-test.js +++ b/test/tap/logglyAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const layouts = require('../../lib/layouts'); function setupLogging(category, options) { diff --git a/test/tap/logstashHTTP-test.js b/test/tap/logstashHTTP-test.js index 7230703..eeb94be 100644 --- a/test/tap/logstashHTTP-test.js +++ b/test/tap/logstashHTTP-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const fakeAxios = { diff --git a/test/tap/logstashUDP-test.js b/test/tap/logstashUDP-test.js index 394b865..ccd9b65 100644 --- a/test/tap/logstashUDP-test.js +++ b/test/tap/logstashUDP-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const udpSent = {}; diff --git a/test/tap/mailgunAppender-test.js b/test/tap/mailgunAppender-test.js index 248bd4a..1d0eaac 100644 --- a/test/tap/mailgunAppender-test.js +++ b/test/tap/mailgunAppender-test.js @@ -2,7 +2,7 @@ const test = require('tap').test; const layouts = require('../../lib/layouts'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const msgs = []; diff --git a/test/tap/multiprocess-shutdown-test.js b/test/tap/multiprocess-shutdown-test.js index f3a537e..52e3cc8 100644 --- a/test/tap/multiprocess-shutdown-test.js +++ b/test/tap/multiprocess-shutdown-test.js @@ -3,7 +3,7 @@ const test = require('tap').test; const log4js = require('../../lib/log4js'); const net = require('net'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('multiprocess appender shutdown (master)', { timeout: 2000 }, (t) => { log4js.configure({ diff --git a/test/tap/multiprocess-test.js b/test/tap/multiprocess-test.js index 7a85e18..b9d3f5b 100644 --- a/test/tap/multiprocess-test.js +++ b/test/tap/multiprocess-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const recording = require('../../lib/appenders/recording'); function makeFakeNet() { diff --git a/test/tap/rabbitmqAppender-test.js b/test/tap/rabbitmqAppender-test.js index 85b97b4..1e6d9d1 100644 --- a/test/tap/rabbitmqAppender-test.js +++ b/test/tap/rabbitmqAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const fakeRabbitmq = { diff --git a/test/tap/redisAppender-test.js b/test/tap/redisAppender-test.js index 2c42af3..fb35a48 100644 --- a/test/tap/redisAppender-test.js +++ b/test/tap/redisAppender-test.js @@ -2,7 +2,7 @@ const test = require('tap').test; // const log4js = require('../../lib/log4js'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options) { const fakeRedis = { diff --git a/test/tap/slackAppender-test.js b/test/tap/slackAppender-test.js index 75048d6..d2a643a 100644 --- a/test/tap/slackAppender-test.js +++ b/test/tap/slackAppender-test.js @@ -1,7 +1,7 @@ 'use strict'; const test = require('tap').test; -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); const realLayouts = require('../../lib/layouts'); function setupLogging(category, options) { diff --git a/test/tap/smtpAppender-test.js b/test/tap/smtpAppender-test.js index 497d076..ccccc94 100644 --- a/test/tap/smtpAppender-test.js +++ b/test/tap/smtpAppender-test.js @@ -2,7 +2,7 @@ const test = require('tap').test; const realLayouts = require('../../lib/layouts'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); function setupLogging(category, options, errorOnSend) { const msgs = []; diff --git a/test/tap/stderrAppender-test.js b/test/tap/stderrAppender-test.js index ee61e9a..f52856f 100644 --- a/test/tap/stderrAppender-test.js +++ b/test/tap/stderrAppender-test.js @@ -2,7 +2,7 @@ const test = require('tap').test; const layouts = require('../../lib/layouts'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('stderr appender', (t) => { const output = []; diff --git a/test/tap/stdoutAppender-test.js b/test/tap/stdoutAppender-test.js index a3b0ce4..c82b57e 100644 --- a/test/tap/stdoutAppender-test.js +++ b/test/tap/stdoutAppender-test.js @@ -2,7 +2,7 @@ const test = require('tap').test; const layouts = require('../../lib/layouts'); -const sandbox = require('sandboxed-module'); +const sandbox = require('@log4js-node/sandboxed-module'); test('stdout appender', (t) => { const output = [];