From 88d8667fabcca3225120cf00d3fa2ff49a03e9a0 Mon Sep 17 00:00:00 2001 From: Robin Lungwitz Date: Fri, 6 Oct 2017 18:54:03 +0200 Subject: [PATCH 1/2] test: use common.fixtures.fixturesDir Replace the common.fixturesDir by common.fixtures.fixturesDir in http2 subsystem test 'server startup' --- test/parallel/test-http2-server-startup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-server-startup.js b/test/parallel/test-http2-server-startup.js index 73964a8886f4d1..108670cce0130e 100644 --- a/test/parallel/test-http2-server-startup.js +++ b/test/parallel/test-http2-server-startup.js @@ -5,6 +5,7 @@ // other than start listening. const common = require('../common'); +const commonFixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -18,9 +19,9 @@ const fs = require('fs'); const options = { key: fs.readFileSync( - path.resolve(common.fixturesDir, 'keys/agent2-key.pem')), + path.resolve(commonFixtures.fixturesDir, 'keys/agent2-key.pem')), cert: fs.readFileSync( - path.resolve(common.fixturesDir, 'keys/agent2-cert.pem')) + path.resolve(commonFixtures.fixturesDir, 'keys/agent2-cert.pem')) }; // There should not be any throws From 5087e155c47274f78dfadfba3561da978fbb9b51 Mon Sep 17 00:00:00 2001 From: Robin Lungwitz Date: Fri, 6 Oct 2017 20:02:10 +0200 Subject: [PATCH 2/2] test: replace readFile by fixtures.readKey --- test/parallel/test-http2-server-startup.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http2-server-startup.js b/test/parallel/test-http2-server-startup.js index 108670cce0130e..9297b3f3cd9ab9 100644 --- a/test/parallel/test-http2-server-startup.js +++ b/test/parallel/test-http2-server-startup.js @@ -18,10 +18,8 @@ const net = require('net'); const fs = require('fs'); const options = { - key: fs.readFileSync( - path.resolve(commonFixtures.fixturesDir, 'keys/agent2-key.pem')), - cert: fs.readFileSync( - path.resolve(commonFixtures.fixturesDir, 'keys/agent2-cert.pem')) + key: commonFixtures.readKey('agent2-key.pem'), + cert: commonFixtures.readKey('agent2-cert.pem') }; // There should not be any throws