Browse Source

test: replace fixturesDir with common.fixtures

PR-URL: https://github.com/nodejs/node/pull/15810
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
v9.x-staging
Kasim Doctor 7 years ago
committed by Gireesh Punathil
parent
commit
006fdb2fe5
  1. 7
      test/parallel/test-tls-key-mismatch.js

7
test/parallel/test-tls-key-mismatch.js

@ -25,15 +25,16 @@ const common = require('../common');
if (!common.hasCrypto) if (!common.hasCrypto)
common.skip('missing crypto'); common.skip('missing crypto');
const fixtures = require('../common/fixtures');
const assert = require('assert'); const assert = require('assert');
const tls = require('tls'); const tls = require('tls');
const fs = require('fs');
const errorMessageRegex = const errorMessageRegex =
/^Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch$/; /^Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch$/;
const options = { const options = {
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), key: fixtures.readKey('agent1-key.pem'),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`) cert: fixtures.readKey('agent2-cert.pem')
}; };
assert.throws(function() { assert.throws(function() {

Loading…
Cancel
Save