Skip to content

Commit d185bfd

Browse files
Casie Lynchgibfahn
Casie Lynch
authored andcommitted
test: replace fixturesDir in test-tls-connect
Replace common.fixturesDir with fixtures module in test-tls-connect. PR-URL: #15849 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent ce07cbe commit d185bfd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-tls-connect.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const common = require('../common');
2525
if (!common.hasCrypto)
2626
common.skip('missing crypto');
2727

28+
const fixtures = require('../common/fixtures');
29+
2830
const assert = require('assert');
29-
const fs = require('fs');
30-
const path = require('path');
3131
const tls = require('tls');
3232

3333
// https://github.com/joyent/node/issues/1218
3434
// uncatchable exception on TLS connection error
3535
{
36-
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
37-
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
36+
const cert = fixtures.readSync('test_cert.pem');
37+
const key = fixtures.readSync('test_key.pem');
3838

3939
const options = { cert: cert, key: key, port: common.PORT };
4040
const conn = tls.connect(options, common.mustNotCall());
@@ -47,8 +47,8 @@ const tls = require('tls');
4747

4848
// SSL_accept/SSL_connect error handling
4949
{
50-
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
51-
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
50+
const cert = fixtures.readSync('test_cert.pem');
51+
const key = fixtures.readSync('test_key.pem');
5252

5353
const conn = tls.connect({
5454
cert: cert,

0 commit comments

Comments
 (0)