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: simplify loadDHParam in TLS test #18103

Closed
wants to merge 1 commit into from

Conversation

tniessen
Copy link
Member

Neither of these tests seems to use the error value.

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 Jan 11, 2018
let path = fixtures.fixturesDir;
if (n !== 'error') path += '/keys';
return fs.readFileSync(`${path}/dh${n}.pem`);
return fixtures.readKey(`dh${n}.pem`);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: it can also be inlined at this point. Ignore this comment if it is more readable in this way.

Copy link
Member Author

@tniessen tniessen Jan 11, 2018

Choose a reason for hiding this comment

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

I considered it but then decided to keep it this way as test-tls-dhe.js declares the same function with additional logic to handle the error case. I can still remove it if you would like.

Copy link
Member

Choose a reason for hiding this comment

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

test-tls-dhe.js, ok it makes sense, it's really a nuance.

@tniessen
Copy link
Member Author

@tniessen
Copy link
Member Author

Landed in eb68a06.

@tniessen tniessen closed this Jan 17, 2018
tniessen added a commit that referenced this pull request Jan 17, 2018
PR-URL: #18103
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
evanlucas pushed a commit that referenced this pull request Jan 30, 2018
PR-URL: #18103
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 27, 2018
PR-URL: #18103
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 27, 2018
PR-URL: #18103
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
This was referenced Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants