Skip to content

Commit e1c45ef

Browse files
Greg-GBMylesBorins
authored andcommitted
test: use fixtures.readKey in https-agent test
PR-URL: #15913 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 70f574e commit e1c45ef

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const common = require('../common');
4+
const fixtures = require('../common/fixtures');
45
if (!common.hasCrypto)
56
common.skip('missing crypto');
67

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

1011
const agent = new https.Agent();
1112

12-
const fs = require('fs');
13-
1413
const options = {
15-
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
16-
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`),
14+
key: fixtures.readKey('agent1-key.pem'),
15+
cert: fixtures.readKey('agent1-cert.pem'),
1716
};
1817

1918
const expectedHeader = /^HTTP\/1.1 200 OK/;

0 commit comments

Comments
 (0)