Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e6845d

Browse filesBrowse files
AdriVanHoudtMylesBorins
authored andcommitted
test: replace common.fixturesDir with fixtures.readSync()
Replace common.fixturesDir with fixtures.readSync() in test-tls-getprotocol. PR-URL: #16802 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 40fa970 commit 1e6845d
Copy full SHA for 1e6845d

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-getprotocol.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-getprotocol.js
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ const common = require('../common');
33
if (!common.hasCrypto)
44
common.skip('missing crypto');
55

6+
// This test ensures that `getProtocol` returns the right protocol
7+
// from a TLS connection
8+
69
const assert = require('assert');
710
const tls = require('tls');
8-
const fs = require('fs');
11+
const fixtures = require('../common/fixtures');
912

1013
const clientConfigs = [
1114
{ secureProtocol: 'TLSv1_method', version: 'TLSv1' },
@@ -14,8 +17,8 @@ const clientConfigs = [
1417
];
1518

1619
const serverConfig = {
17-
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
18-
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`)
20+
key: fixtures.readSync('/keys/agent2-key.pem'),
21+
cert: fixtures.readSync('/keys/agent2-cert.pem')
1922
};
2023

2124
const server = tls.createServer(serverConfig, common.mustCall(function() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.