Skip to content

use fixtures - #15805

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

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

Conversation

@boutell

@boutell boutell commented Oct 6, 2017 •

Copy link
Copy Markdown

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 Node.js core tests and test infrastructure. 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

boutell commented Oct 6, 2017

Copy link
Copy Markdown
Author

@pawelgolda how about now? Thanks!

@mscdex mscdex added the https Issues and 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

@benjamingr benjamingr left a comment

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.

Looks good to me, thanks!

@cjihrig cjihrig left a comment

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.

Does the linter complain about fs being unused now?

@Trott

Trott commented Oct 7, 2017

Copy link
Copy Markdown
Member

@refack

refack commented Oct 8, 2017

Copy link
Copy Markdown
Contributor

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.

@jasnell jasnell left a comment

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.

LGTM with @lpinca's suggestion.

@jasnell

jasnell commented Oct 13, 2017

Copy link
Copy Markdown
Member

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

jasnell commented Oct 13, 2017

Copy link
Copy Markdown
Member

Landed in c29e366

@jasnell jasnell closed this Oct 13, 2017
@boutell

boutell commented Oct 13, 2017 via email

Copy link
Copy Markdown
Author

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 and PRs related to the https subsystem. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.