Permalink
Browse files

test: update test to use fixtures.readKey

Use fixtures.readKey() rather than common.fixturesDir in
test-regress-GH-1531.

PR-URL: #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>
  • Loading branch information...
darahayes authored and Trott committed Nov 6, 2017
1 parent 74d9dc2 commit 207b24a75e5a23b58e960effe9852430cacdddbe
Showing with 8 additions and 4 deletions.
  1. +8 −4 test/parallel/test-regress-GH-1531.js
@@ -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) {

0 comments on commit 207b24a

Please sign in to comment.