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

test: replace fixturesdir use common.fixtures #15973

Closed
wants to merge 5 commits into from

Conversation

pauljohnberry
Copy link
Contributor

@pauljohnberry pauljohnberry commented Oct 6, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@pauljohnberry pauljohnberry changed the title fixtures: replace fixturesDir with common.fixtures module usage test: replace fixturesdir use common.fixtures Oct 6, 2017
@@ -13,7 +14,8 @@ const {
HTTP2_HEADER_CONTENT_LENGTH
} = http2.constants;

const fname = path.resolve(common.fixturesDir, 'elipses.txt');
const fname = path.resolve(fixtures.path(), 'elipses.txt');
Copy link
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.path

Copy link
Contributor Author

@pauljohnberry pauljohnberry Oct 6, 2017

Choose a reason for hiding this comment

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

ah, you mean instead of path.resolve? wanted to limit changes as fixtures.path uses path.join in the background rather than resolve. so: const fname = fixtures.path('elipses.txt');

@mscdex mscdex added the http2 Issues or PRs related to the http2 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
@refack
Copy link
Contributor

refack commented Oct 7, 2017

Welcome @firesnapper and thank you for the contribution 🥇

Generally the change looks good, but as a result of it path is now an unused var, and the linter test fails:

not ok 30 - /usr/home/iojs/build/workspace/node-test-linter/test/parallel/test-http2-respond-file-fd.js
  ---
  message: '''path'' is assigned a value but never used.'
  severity: error
  data:
    line: 9
    column: 7
    ruleId: no-unused-vars
  ...

https://ci.nodejs.org/job/node-test-linter/12313/ 🔺
https://ci.nodejs.org/job/node-test-commit-linuxone/9093/ ✔️

@refack refack self-assigned this Oct 7, 2017
@pauljohnberry
Copy link
Contributor Author

thanks @refack, sorry for missing this.

@refack
Copy link
Contributor

refack commented Oct 7, 2017

@firesnapper, no need to be sorry at all.
Thank you for following up.

https://ci.nodejs.org/job/node-test-linter/12315/ ✔️

const fs = require('fs');

const {
HTTP2_HEADER_CONTENT_TYPE,
HTTP2_HEADER_CONTENT_LENGTH
} = http2.constants;

const fname = path.resolve(common.fixturesDir, 'elipses.txt');
const fname = fixtures.path('elipses.txt');

Copy link
Member

Choose a reason for hiding this comment

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

Nit: This does not really need the newline IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @tniessen I agree, removed now.

refack pushed a commit that referenced this pull request Oct 7, 2017
PR-URL: #15973
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@refack
Copy link
Contributor

refack commented Oct 7, 2017

Landed in 6e1948e
@firesnapper congratulations on being promoted from:
image
to
image

@refack refack closed this Oct 7, 2017
MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
PR-URL: #15973
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@MylesBorins MylesBorins mentioned this pull request Oct 11, 2017
addaleax pushed a commit to addaleax/ayo that referenced this pull request Oct 12, 2017
PR-URL: nodejs/node#15973
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@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. http2 Issues or PRs related to the http2 subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.