Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: replaced common.fixturesDir with common.fixtures module usage
  • Loading branch information
letthewookieewin committed Oct 6, 2017
commit 2c328859e0cad67559e30845ad4469ffc86aa8e8
5 changes: 3 additions & 2 deletions test/parallel/test-https-client-get-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');

Expand All @@ -35,8 +36,8 @@ const url = require('url');
const URL = url.URL;

const options = {
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
key: fs.readFileSync(`${fixtures.fixturesDir}/keys/agent1-key.pem`),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be using method fixtures.readKey instead of fs.readFileSync to get the keys.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh! Updated to use fixtures.readKey and fixtures.readSync (for the cert).

cert: fs.readFileSync(`${fixtures.fixturesDir}/keys/agent1-cert.pem`)
};

const server = https.createServer(options, common.mustCall((req, res) => {
Expand Down