From 4e2e15f79b542ddb0193c8c32f1e49341abddb5e Mon Sep 17 00:00:00 2001 From: Roger Jiang Date: Fri, 6 Oct 2017 09:34:58 -0700 Subject: [PATCH] test: switch to use common.fixtures.fixturesDir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit code and learn 2017 first task is to switch from common.fixturesDir to common.fixtures.fixturesDir in test-https-strict.js PR-URL: https://github.com/nodejs/node/pull/15814 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Gibson Fahnestock Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- test/parallel/test-https-strict.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 51d209b4ed6..05bbe43a842 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -21,6 +21,7 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -29,15 +30,9 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; const assert = require('assert'); const https = require('https'); -const fs = require('fs'); -const path = require('path'); - -function file(fname) { - return path.resolve(common.fixturesDir, 'keys', fname); -} function read(fname) { - return fs.readFileSync(file(fname)); + return fixtures.readKey(fname); } // key1 is signed by ca1.