Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fixtures #15805

Closed
wants to merge 2 commits into from
Closed

use fixtures #15805

wants to merge 2 commits into from

Conversation

boutell
Copy link

@boutell boutell commented Oct 6, 2017

src: use fixtures module

In test-https-server-keep-alive-timeout.js, replaced common.fixturesDir with use of the common.fixtures module as requested at nodejs interactive code & learn. Thanks!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@@ -11,8 +13,8 @@ const fs = require('fs');
const tests = [];

const serverOptions = {
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
key: fs.readFileSync(fixtures.path('/keys/agent1-key.pem')),
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using fixtures.readKey instead of fs.readFileSync to get the keys.

@boutell
Copy link
Author

boutell commented Oct 6, 2017

@pawelgolda how about now? Thanks!

@mscdex mscdex added the https Issues or PRs related to the https subsystem. label Oct 6, 2017
@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Oct 7, 2017
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Does the linter complain about fs being unused now?

@Trott
Copy link
Member

Trott commented Oct 7, 2017

@refack
Copy link
Contributor

refack commented Oct 8, 2017

Welcome @boutell and thank you for the contribution 🥇

The linter CI job found some lint in this PR:

not ok 28 - /usr/home/iojs/build/workspace/node-test-linter/test/parallel/test-https-server-keep-alive-timeout.js
  ---
  message: '''fs'' is assigned a value but never used.'
  severity: error
  data:
    line: 11
    column: 7
    ruleId: no-unused-vars
  ...

Hope you find the time to follow up.

@refack refack self-assigned this Oct 8, 2017
@@ -1,6 +1,8 @@
'use strict';

const common = require('../common');
const fixtures = require('../common/fixtures');
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can you please move this after the common.hasCrypto check? Thank you.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM with @lpinca's suggestion.

@jasnell
Copy link
Member

jasnell commented Oct 13, 2017

Went ahead and fixed the nits on landing

jasnell pushed a commit that referenced this pull request Oct 13, 2017
PR-URL: #15805
Reviewed-By: Ryan Graham <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@jasnell
Copy link
Member

jasnell commented Oct 13, 2017

Landed in c29e366

@jasnell jasnell closed this Oct 13, 2017
@boutell
Copy link
Author

boutell commented Oct 13, 2017 via email

addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 15, 2017
PR-URL: nodejs/node#15805
Reviewed-By: Ryan Graham <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
targos pushed a commit that referenced this pull request Oct 18, 2017
PR-URL: #15805
Reviewed-By: Ryan Graham <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@refack refack removed their assignment Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. https Issues or PRs related to the https subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.