From 9c229b4bd3e210d4e16d1b5dfb6fcd78c3363f61 Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Fri, 6 Oct 2017 10:01:58 -0700 Subject: [PATCH] test: use fixtures.readKey in https-timeout-server Replace `common.fixturesDir` usage in test-https-timeout-server.js with `fixtures.readKey()`. PR-URL: https://github.com/nodejs/node/pull/15871 Reviewed-By: Joyee Cheung Reviewed-By: Gireesh Punathil --- test/parallel/test-https-timeout-server.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index 8b6411e04b093d..94d1c663f3ad14 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -4,15 +4,16 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); + const assert = require('assert'); const https = require('https'); const net = require('net'); -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'), handshakeTimeout: 50 };