Skip to content

Commit 61b0af0

Browse files
UnrememberMetargos
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 55fa067 commit 61b0af0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/parallel/test-https-strict.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
'use strict';
2323
const common = require('../common');
24+
const fixtures = require('../common/fixtures');
2425
if (!common.hasCrypto)
2526
common.skip('missing crypto');
2627

@@ -29,15 +30,9 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
2930

3031
const assert = require('assert');
3132
const https = require('https');
32-
const fs = require('fs');
33-
const path = require('path');
34-
35-
function file(fname) {
36-
return path.resolve(common.fixturesDir, 'keys', fname);
37-
}
3833

3934
function read(fname) {
40-
return fs.readFileSync(file(fname));
35+
return fixtures.readKey(fname);
4136
}
4237

4338
// key1 is signed by ca1.

0 commit comments

Comments
 (0)