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 <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
brianoconnell authored and MylesBorins committed Nov 28, 2017
1 parent 54d4557 commit 3d8b3f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-tls-hello-parser-failure.js
@@ -1,6 +1,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 @@ -9,11 +13,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 3d8b3f7

Please sign in to comment.