summaryrefslogtreecommitdiff
path: root/test/parallel/test-https-truncate.js
diff options
context:
space:
mode:
authorGene Wu <genewoo@gmail.com>2017-10-06 10:01:16 -0700
committerRuben Bridgewater <ruben@bridgewater.de>2017-10-19 01:52:48 -0200
commitc35a3e004e17925a0591d7956c872a8400b9fb15 (patch)
tree933ab52f2032f1bdb46a4c931b1ca6fd30cbc49d /test/parallel/test-https-truncate.js
parentb0965334cf416d8e4193477d0d0138ab89917dbc (diff)
downloadandroid-node-v8-c35a3e004e17925a0591d7956c872a8400b9fb15.tar.gz
android-node-v8-c35a3e004e17925a0591d7956c872a8400b9fb15.tar.bz2
android-node-v8-c35a3e004e17925a0591d7956c872a8400b9fb15.zip
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>
Diffstat (limited to 'test/parallel/test-https-truncate.js')
-rw-r--r--test/parallel/test-https-truncate.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js
index dcefcca104..d2a3179c0d 100644
--- a/test/parallel/test-https-truncate.js
+++ b/test/parallel/test-https-truncate.js
@@ -26,12 +26,11 @@ if (!common.hasCrypto)
common.skip('missing crypto');
const assert = require('assert');
+const fixtures = require('../common/fixtures');
const https = require('https');
-const fs = require('fs');
-
-const key = fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`);
-const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`);
+const key = fixtures.readKey('agent1-key.pem');
+const cert = fixtures.readKey('agent1-cert.pem');
// number of bytes discovered empirically to trigger the bug
const data = Buffer.alloc(1024 * 32 + 1);