Skip to content

Commit 207b24a

Browse files
Dara HayesTrott
Dara Hayes
authored andcommitted
test: update test to use fixtures.readKey
Use fixtures.readKey() rather than common.fixturesDir in test-regress-nodejsGH-1531. PR-URL: nodejs#16811 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 74d9dc2 commit 207b24a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/parallel/test-regress-GH-1531.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
'use strict';
22
const common = require('../common');
33

4+
// This test ensures that a http request callback is called
5+
// when the agent option is set
6+
// See https://github.com/nodejs/node-v0.x-archive/issues/1531
7+
48
if (!common.hasCrypto)
59
common.skip('missing crypto');
610

7-
const https = require('https');
11+
const fixtures = require('../common/fixtures');
812

9-
const fs = require('fs');
13+
const https = require('https');
1014

1115
const options = {
12-
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
13-
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
16+
key: fixtures.readKey('agent1-key.pem'),
17+
cert: fixtures.readKey('agent1-cert.pem')
1418
};
1519

1620
const server = https.createServer(options, function(req, res) {

0 commit comments

Comments
 (0)