Skip to content

Commit 9eac5aa

Browse files
UnrememberMeMylesBorins
authored andcommitted
test: switch to use common.fixtures.fixturesDir
code and learn 2017 first task is to switch from common.fixturesDir to common.fixtures.fixturesDir in test-https-strict.js PR-URL: #15814 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4495388 commit 9eac5aa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/parallel/test-https-strict.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22
const common = require('../common');
3+
const fixtures = require('../common/fixtures');
34
if (!common.hasCrypto)
45
common.skip('missing crypto');
56

@@ -8,15 +9,9 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
89

910
const assert = require('assert');
1011
const https = require('https');
11-
const fs = require('fs');
12-
const path = require('path');
13-
14-
function file(fname) {
15-
return path.resolve(common.fixturesDir, 'keys', fname);
16-
}
1712

1813
function read(fname) {
19-
return fs.readFileSync(file(fname));
14+
return fixtures.readKey(fname);
2015
}
2116

2217
// key1 is signed by ca1.

0 commit comments

Comments
 (0)