Browse Source

test: use fixtures module

Replace common.fixturesDir with fixtures module usage in
test/parallel/test-tls-fast-writing.js.

PR-URL: https://github.com/nodejs/node/pull/15808
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v9.x-staging
Ben Hallion 7 years ago
committed by Rich Trott
parent
commit
2b76b5d8dd
  1. 9
      test/parallel/test-tls-fast-writing.js

9
test/parallel/test-tls-fast-writing.js

@ -24,14 +24,13 @@ const common = require('../common');
if (!common.hasCrypto) if (!common.hasCrypto)
common.skip('missing crypto'); common.skip('missing crypto');
const fixtures = require('../common/fixtures');
const assert = require('assert'); const assert = require('assert');
const tls = require('tls'); const tls = require('tls');
const fs = require('fs');
const dir = common.fixturesDir; const options = { key: fixtures.readSync('test_key.pem'),
const options = { key: fs.readFileSync(`${dir}/test_key.pem`), cert: fixtures.readSync('test_cert.pem'),
cert: fs.readFileSync(`${dir}/test_cert.pem`), ca: [ fixtures.readSync('test_ca.pem') ] };
ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] };
const server = tls.createServer(options, onconnection); const server = tls.createServer(options, onconnection);
let gotChunk = false; let gotChunk = false;

Loading…
Cancel
Save