diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js index dd96aa6f7494a6..bf75eb8a398647 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -3,9 +3,12 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +// This test ensures that `getProtocol` returns the right protocol +// from a TLS connection + const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); +const fixtures = require('../common/fixtures'); const clientConfigs = [ { secureProtocol: 'TLSv1_method', version: 'TLSv1' }, @@ -14,8 +17,8 @@ const clientConfigs = [ ]; const serverConfig = { - key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`) + key: fixtures.readSync('/keys/agent2-key.pem'), + cert: fixtures.readSync('/keys/agent2-cert.pem') }; const server = tls.createServer(serverConfig, common.mustCall(function() {