Skip to content

Commit

Permalink
test: use common.fixtures in tls test
Browse files Browse the repository at this point in the history
PR-URL: #15965
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
Ben Michel authored and MylesBorins committed Nov 28, 2017
1 parent 71daa68 commit e68ef29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/parallel/test-tls-max-send-fragment.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');

if (!common.hasCrypto)
common.skip('missing crypto');

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

const buf = Buffer.allocUnsafe(10000);
let received = 0;
const maxChunk = 768;

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) {
// Lower and upper limits
assert(!c.setMaxSendFragment(511));
Expand Down

0 comments on commit e68ef29

Please sign in to comment.