Skip to content

Commit

Permalink
test: use fixtures.readKey in https-agent test
Browse files Browse the repository at this point in the history
PR-URL: #15913
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Greg-GB authored and MylesBorins committed Nov 14, 2017
1 parent fec39d6 commit 4cdacfe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/parallel/test-https-agent-create-connection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const common = require('../common');
const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');

Expand All @@ -9,11 +10,9 @@ const https = require('https');

const agent = new https.Agent();

const fs = require('fs');

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 expectedHeader = /^HTTP\/1.1 200 OK/;
Expand Down

0 comments on commit 4cdacfe

Please sign in to comment.