mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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>
This commit is contained in:
1 parent
70f574e6ff
commit
e1c45efdbb
1 file changed
+3
-4
@@ -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/;
|
||||
|
||||
Reference in new issue
Block a user