From e5fbc0356318e407a8f7be010ae76e64b223a686 Mon Sep 17 00:00:00 2001 From: Kasim Doctor Date: Fri, 6 Oct 2017 09:40:55 -0700 Subject: [PATCH] test: replace fixturesDir with common.fixtures PR-URL: https://github.com/nodejs/node/pull/15810 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil --- test/parallel/test-tls-key-mismatch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js index c30164652511a9..c4fe706bc158ab 100644 --- a/test/parallel/test-tls-key-mismatch.js +++ b/test/parallel/test-tls-key-mismatch.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 tls = require('tls'); -const fs = require('fs'); const errorMessageRegex = /^Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch$/; const options = { - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`) + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent2-cert.pem') }; assert.throws(function() {