Skip to content

Commit

Permalink
test: remove common.fixturesDir from tests
Browse files Browse the repository at this point in the history
Use common/fixtures module instead of common.fixturesDir.

PR-URL: #17400
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Lance Ball <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Dec 12, 2017
1 parent 23967b2 commit 92b29cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 4 additions & 6 deletions test/parallel/test-tls-interleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');

const tls = require('tls');

const fs = require('fs');
const fixtures = require('../common/fixtures');

const dir = common.fixturesDir;
const options = { key: fs.readFileSync(`${dir}/test_key.pem`),
cert: fs.readFileSync(`${dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] };
const options = { key: fixtures.readSync('test_key.pem'),
cert: fixtures.readSync('test_cert.pem'),
ca: [ fixtures.readSync('test_ca.pem') ] };

const writes = [
'some server data',
Expand Down
7 changes: 4 additions & 3 deletions test/parallel/test-tls-invoke-queued.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');
const fs = require('fs');
const tls = require('tls');

const fixtures = require('../common/fixtures');

let received = '';

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')
}, common.mustCall(function(c) {
c._write('hello ', null, common.mustCall(function() {
c._write('world!', null, common.mustCall(function() {
Expand Down

0 comments on commit 92b29cd

Please sign in to comment.