mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: replace fixturesDir in test-tls-connect
Replace common.fixturesDir with fixtures module in test-tls-connect. PR-URL: https://github.com/nodejs/node/pull/15849 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
@@ -25,16 +25,16 @@ const common = require('../common');
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const tls = require('tls');
|
||||
|
||||
// https://github.com/joyent/node/issues/1218
|
||||
// uncatchable exception on TLS connection error
|
||||
{
|
||||
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
|
||||
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
|
||||
const cert = fixtures.readSync('test_cert.pem');
|
||||
const key = fixtures.readSync('test_key.pem');
|
||||
|
||||
const options = { cert: cert, key: key, port: common.PORT };
|
||||
const conn = tls.connect(options, common.mustNotCall());
|
||||
@@ -47,8 +47,8 @@ const tls = require('tls');
|
||||
|
||||
// SSL_accept/SSL_connect error handling
|
||||
{
|
||||
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
|
||||
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
|
||||
const cert = fixtures.readSync('test_cert.pem');
|
||||
const key = fixtures.readSync('test_key.pem');
|
||||
|
||||
const conn = tls.connect({
|
||||
cert: cert,
|
||||
|
||||
Reference in New Issue
Block a user