test: replace fixturesDir with the fixtures module
PR-URL: https://github.com/nodejs/node/pull/16027 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
This commit is contained in:
parent
d90dca6620
commit
1a9f48a875
@ -25,16 +25,14 @@ const common = require('../common');
|
|||||||
if (!common.hasCrypto)
|
if (!common.hasCrypto)
|
||||||
common.skip('missing crypto');
|
common.skip('missing crypto');
|
||||||
|
|
||||||
|
const fixtures = require('../common/fixtures');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const hostExpect = 'localhost';
|
const hostExpect = 'localhost';
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const fixtures = path.join(common.fixturesDir, 'keys');
|
|
||||||
const options = {
|
const options = {
|
||||||
key: fs.readFileSync(`${fixtures}/agent1-key.pem`),
|
key: fixtures.readKey('agent1-key.pem'),
|
||||||
cert: fs.readFileSync(`${fixtures}/agent1-cert.pem`)
|
cert: fixtures.readKey('agent1-cert.pem')
|
||||||
};
|
};
|
||||||
let gotHttpsResp = false;
|
let gotHttpsResp = false;
|
||||||
let gotHttpResp = false;
|
let gotHttpResp = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user