Browse Source

test: use fixtures.readKey in https-agent test

PR-URL: https://github.com/nodejs/node/pull/15913
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v9.x-staging
Greg Byram 7 years ago
committed by Gibson Fahnestock
parent
commit
d36433e1b6
No known key found for this signature in database GPG Key ID: B01FBB92821C587A
  1. 7
      test/parallel/test-https-agent-create-connection.js

7
test/parallel/test-https-agent-create-connection.js

@ -1,6 +1,7 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');
@ -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/;

Loading…
Cancel
Save