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: update test to use fixtures #15844

Closed
wants to merge 5 commits into from
Closed

test: update test to use fixtures #15844

wants to merge 5 commits into from

Conversation

dinophile
Copy link
Contributor

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
@@ -30,12 +31,12 @@ const fs = require('fs');

const options = {
key: [
fs.readFileSync(`${common.fixturesDir}/keys/ec-key.pem`),
fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
fs.readFileSync(fixtures.path('/keys/ec-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.

This could be using method fixtures.readKey to get the keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does it make a difference that fs.readFileSync() is platform specific (though only if the path is a directory I see...so not an issue). I've always been taught to keep it as simple as possible...so I assumed using path.join() is just a bit clearer? But live and learn! :)

Copy link
Contributor

Choose a reason for hiding this comment

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

The readFileSync(fixtures(keys...)) pattern is so common in the tests that the fixtures.readKey wrapper was created to handle it. Take a look at fixtures.readKey()!

Something like fixtures.readKey('ec-key.pem').

@dinophile
Copy link
Contributor Author

Well that makes sense! Thank you! I'll make the change when I get back to my computer!

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

soft ping @dinophile

@dinophile
Copy link
Contributor Author

dinophile commented Oct 10, 2017

Sorry! Was travelling to and from a lot of places over the long weekend! I'm now back at work and have pushed the fix! Thanks for everyone's patience!

@@ -1,4 +1,4 @@
// Copyright Joyent, Inc. and other Node contributors.
no// Copyright Joyent, Inc. and other Node contributors.
Copy link
Member

Choose a reason for hiding this comment

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

unexpected manual error? please correct it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh dear...trackpad issues! Thanks! Fixed!

@refack refack self-assigned this Oct 10, 2017
@@ -21,21 +21,21 @@

'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: would you mind moving this after the common.hasCrypto check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not at all! Done!

@lpinca
Copy link
Member

lpinca commented Oct 11, 2017

@Trott
Copy link
Member

Trott commented Oct 11, 2017

CI lint failure is unrelated and fixed in #16145

@jasnell jasnell changed the title Carrowsmith/test tls multi key.js test: update test to use fixtures Oct 13, 2017
jasnell pushed a commit that referenced this pull request Oct 13, 2017
PR-URL: #15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

jasnell commented Oct 13, 2017

landed in 5d80f00

@jasnell jasnell closed this Oct 13, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 15, 2017
PR-URL: nodejs/node#15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 18, 2017
PR-URL: #15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
PR-URL: #15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
PR-URL: #15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
PR-URL: #15844
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[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. test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.