Skip to content

Commit 5bb0672

Browse files
RubenVerborghdmitrizagidulin
authored andcommitted
Set NODE_TLS_REJECT_UNAUTHORIZED for tests (only).
1 parent aa0b6b9 commit 5bb0672

File tree

6 files changed

+1
-10
lines changed

6 files changed

+1
-10
lines changed

lib/handlers/allow.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ var async = require('async')
1010
var debug = require('../debug').ACL
1111
var utils = require('../utils')
1212

13-
// TODO should this be set?
14-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
15-
1613
function allow (mode) {
1714
return function allowHandler (req, res, next) {
1815
var ldp = req.app.locals.ldp

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"scripts": {
9999
"solid": "node ./bin/solid.js",
100100
"standard": "standard",
101-
"mocha": "nyc mocha ./test/**/*.js",
101+
"mocha": "NODE_TLS_REJECT_UNAUTHORIZED=0 nyc mocha ./test/**/*.js",
102102
"test": "npm run standard && npm run mocha",
103103
"test-integration": "mocha ./test/integration/*.js",
104104
"test-unit": "mocha ./test/unit/*.js",

test/integration/account-creation-oidc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const path = require('path')
88
const fs = require('fs-extra')
99

1010
describe('AccountManager (OIDC account creation tests)', function () {
11-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
1211
this.timeout(10000)
1312

1413
var serverUri = 'https://localhost:3457'

test/integration/account-creation-tls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
//
1010
// describe('AccountManager (TLS account creation tests)', function () {
1111
// this.timeout(10000)
12-
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
1312
//
1413
// var address = 'https://localhost:3457'
1514
// var host = 'localhost:3457'

test/integration/errors-oidc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const fs = require('fs-extra')
55
const expect = require('chai').expect
66

77
describe('OIDC error handling', function () {
8-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
9-
108
const serverUri = 'https://localhost:3457'
119
var ldpHttpsServer
1210
const rootPath = path.join(__dirname, '../resources/accounts/errortests')

test/integration/http-copy.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var solidServer = require('../../index')
99

1010
describe('HTTP COPY API', function () {
1111
this.timeout(10000)
12-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
13-
1412
var address = 'https://localhost:3456'
1513

1614
var ldpHttpsServer

0 commit comments

Comments
 (0)