diff options
author | woj <wsierakowski@gmail.com> | 2017-11-06 15:24:50 +0000 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-11-08 12:31:39 +0000 |
commit | fa8aee8c598aa3dcc0cc35a11231502d31af5b38 (patch) | |
tree | 09b08a58fce59adf176ebb25dff6e2175e907d44 /test/parallel/test-tls-js-stream.js | |
parent | d82bedcb7b43049fae28c82edd8259e241081331 (diff) | |
download | android-node-v8-fa8aee8c598aa3dcc0cc35a11231502d31af5b38.tar.gz android-node-v8-fa8aee8c598aa3dcc0cc35a11231502d31af5b38.tar.bz2 android-node-v8-fa8aee8c598aa3dcc0cc35a11231502d31af5b38.zip |
test: replace common.fixtiresDir with fixtures.readKey()
Use fixtures module in test/parallel/test-tls-js-stream.js.
PR-URL: https://github.com/nodejs/node/pull/16817
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-tls-js-stream.js')
-rw-r--r-- | test/parallel/test-tls-js-stream.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/parallel/test-tls-js-stream.js b/test/parallel/test-tls-js-stream.js index f535a46cce..908f4c4887 100644 --- a/test/parallel/test-tls-js-stream.js +++ b/test/parallel/test-tls-js-stream.js @@ -1,13 +1,15 @@ 'use strict'; 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 stream = require('stream'); -const fs = require('fs'); const net = require('net'); +const stream = require('stream'); +const tls = require('tls'); const connected = { client: 0, @@ -15,8 +17,8 @@ const connected = { }; const server = tls.createServer({ - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') }, function(c) { console.log('new client'); connected.server++; |