From 6a44442b5fd61dd286d971d7bf4e59165b6e03ea Mon Sep 17 00:00:00 2001 From: Robin Lungwitz Date: Fri, 6 Oct 2017 18:54:03 +0200 Subject: [PATCH] test: use fixtures.readKey Replace the common.fixturesDir by fixtures.readKey in http2 subsystem test 'server startup'. PR-URL: https://github.com/nodejs/node/pull/15892 Reviewed-By: Sam Roberts Reviewed-By: Daijiro Wachi Reviewed-By: Ruben Bridgewater --- test/parallel/test-http2-server-startup.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-http2-server-startup.js b/test/parallel/test-http2-server-startup.js index ba7c3f1f251ad3..fc76f9b21703e4 100644 --- a/test/parallel/test-http2-server-startup.js +++ b/test/parallel/test-http2-server-startup.js @@ -6,22 +6,19 @@ // other than start listening. const common = require('../common'); +const commonFixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); const http2 = require('http2'); -const path = require('path'); const tls = require('tls'); const net = require('net'); -const fs = require('fs'); const options = { - key: fs.readFileSync( - path.resolve(common.fixturesDir, 'keys/agent2-key.pem')), - cert: fs.readFileSync( - path.resolve(common.fixturesDir, 'keys/agent2-cert.pem')) + key: commonFixtures.readKey('agent2-key.pem'), + cert: commonFixtures.readKey('agent2-cert.pem') }; // There should not be any throws