test: use fixtures in test-https-set-timeout-server
Task to replace the common.fixturesDir with the usage of the common.fixtures module. At Node.js Interactive. First PR to Node.js. Yay! PR-URL: https://github.com/nodejs/node/pull/15886 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
c4231aaad3
commit
0e1455b909
@ -26,7 +26,7 @@ if (!common.hasCrypto)
|
|||||||
common.skip('missing crypto');
|
common.skip('missing crypto');
|
||||||
|
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const fs = require('fs');
|
const fixtures = require('../common/fixtures');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
const tls = require('tls');
|
const tls = require('tls');
|
||||||
@ -34,8 +34,8 @@ const tls = require('tls');
|
|||||||
const tests = [];
|
const tests = [];
|
||||||
|
|
||||||
const serverOptions = {
|
const serverOptions = {
|
||||||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
|
key: fixtures.readKey('agent1-key.pem'),
|
||||||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
|
cert: fixtures.readKey('agent1-cert.pem')
|
||||||
};
|
};
|
||||||
|
|
||||||
function test(fn) {
|
function test(fn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user