test: use fixtures module in test-https-truncate

PR-URL: https://github.com/nodejs/node/pull/15875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Gene Wu authored and Ruben Bridgewater committed 2017-10-19 01:52:48 -02:00
1 parent b0965334cf
commit c35a3e004e
1 file changed
+3 -4
+3 -4
View File
@@ -26,12 +26,11 @@ if (!common.hasCrypto)
common.skip('missing crypto'); common.skip('missing crypto');
const assert = require('assert'); const assert = require('assert');
const fixtures = require('../common/fixtures');
const https = require('https'); const https = require('https');
const fs = require('fs'); const key = fixtures.readKey('agent1-key.pem');
const cert = fixtures.readKey('agent1-cert.pem');
const key = fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`);
const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`);
// number of bytes discovered empirically to trigger the bug // number of bytes discovered empirically to trigger the bug
const data = Buffer.alloc(1024 * 32 + 1); const data = Buffer.alloc(1024 * 32 + 1);