Skip to content

Commit

Permalink
test: refactor tls test to use fixtres.readSync
Browse files Browse the repository at this point in the history
PR-URL: #16816
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
brianoconnell authored and MylesBorins committed Nov 16, 2017
1 parent b307582 commit 33f2fff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-tls-hello-parser-failure.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
'use strict';

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

// This test ensures that the tls parser causes a client error if the client
// sends invalid data.

if (!common.hasCrypto)
common.skip('missing crypto');
Expand All @@ -30,11 +34,10 @@ const assert = require('assert');
const tls = require('tls');

const net = require('net');
const fs = require('fs');

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

const bonkers = Buffer.alloc(1024 * 1024, 42);
Expand Down

0 comments on commit 33f2fff

Please sign in to comment.