mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: fixturesDir replaced to fixtures module
replaced fs and use of fixturesDir to fixtures module and readKey method PR-URL: https://github.com/nodejs/node/pull/15809 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
1 parent
d70f9f6a35
commit
71e68799ef
1 file changed
+8
-4
@@ -1,13 +1,17 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const fs = require('fs');
|
||||
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
const fixtures = require('../common/fixtures');
|
||||
const https = require('https');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const options = {
|
||||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
|
||||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`),
|
||||
ca: fs.readFileSync(`${common.fixturesDir}/keys/ca1-cert.pem`)
|
||||
key: fixtures.readKey('agent1-key.pem'),
|
||||
cert: fixtures.readKey('agent1-cert.pem'),
|
||||
ca: fixtures.readKey('ca1-cert.pem')
|
||||
};
|
||||
|
||||
const server = https.createServer(options, function(req, res) {
|
||||
|
||||
Reference in new issue
Block a user