mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: replaced common.fixturesDir with readKey
PR-URL: https://github.com/nodejs/node/pull/15933 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
1 parent
4457f4feb9
commit
b050c14d91
1 file changed
+3
-3
@@ -21,6 +21,7 @@
|
||||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const fixtures = require('../common/fixtures');
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
@@ -29,14 +30,13 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
const assert = require('assert');
|
||||
const https = require('https');
|
||||
const fs = require('fs');
|
||||
const url = require('url');
|
||||
|
||||
const URL = url.URL;
|
||||
|
||||
const options = {
|
||||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
|
||||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
|
||||
key: fixtures.readKey('agent1-key.pem'),
|
||||
cert: fixtures.readKey('agent1-cert.pem')
|
||||
};
|
||||
|
||||
const server = https.createServer(options, common.mustCall((req, res) => {
|
||||
|
||||
Reference in new issue
Block a user