Skip to content

Commit

Permalink
test: update test to use fixtures.readKey
Browse files Browse the repository at this point in the history
Use fixtures.readKey() rather than common.fixturesDir in
test-regress-nodejsGH-1531.

PR-URL: nodejs#16811
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
Dara Hayes authored and Trott committed Nov 7, 2017
1 parent 74d9dc2 commit 207b24a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/parallel/test-regress-GH-1531.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
'use strict';
const common = require('../common');

// This test ensures that a http request callback is called
// when the agent option is set
// See https://github.com/nodejs/node-v0.x-archive/issues/1531

if (!common.hasCrypto)
common.skip('missing crypto');

const https = require('https');
const fixtures = require('../common/fixtures');

const fs = require('fs');
const https = require('https');

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, function(req, res) {
Expand Down

0 comments on commit 207b24a

Please sign in to comment.