Skip to content

use fixtures#15805

Closed
boutell wants to merge 2 commits into
nodejs:masterfrom
boutell:common.fixtures
Closed

use fixtures#15805
boutell wants to merge 2 commits into
nodejs:masterfrom
boutell:common.fixtures

Conversation

@boutell
Copy link
Copy Markdown

@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
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Trott commented Oct 7, 2017

@refack
Copy link
Copy Markdown
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
'use strict';

const common = require('../common');
const fixtures = require('../common/fixtures');
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@jasnell
Copy link
Copy Markdown
Member

jasnell commented Oct 13, 2017

Landed in c29e366

@jasnell jasnell closed this Oct 13, 2017
@boutell
Copy link
Copy Markdown
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 <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
targos pushed a commit that referenced this pull request Oct 18, 2017
PR-URL: #15805
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@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.