Browse Source

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: https://github.com/nodejs/node/pull/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>
v9.x-staging
Roger Jiang 7 years ago
committed by James M Snell
parent
commit
4e2e15f79b
  1. 9
      test/parallel/test-https-strict.js

9
test/parallel/test-https-strict.js

@ -21,6 +21,7 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');
@ -29,15 +30,9 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const assert = require('assert');
const https = require('https');
const fs = require('fs');
const path = require('path');
function file(fname) {
return path.resolve(common.fixturesDir, 'keys', fname);
}
function read(fname) {
return fs.readFileSync(file(fname));
return fixtures.readKey(fname);
}
// key1 is signed by ca1.

Loading…
Cancel
Save