-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Replaced https-socket-options test using fixtures #15882
Replaced https-socket-options test using fixtures #15882
Conversation
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir
@@ -30,8 +31,8 @@ const fs = require('fs'); | |||
const http = require('http'); | |||
|
|||
const options = { | |||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), | |||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) | |||
key: fixtures.readSync(`/keys/agent1-key.pem`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be readKey method instead of readSync
changing calls from fixtures.readSync to fixtures.readKey where applicable.
Thanks for catch that @pawelgolda |
fixed typo with pem key`
@@ -21,6 +21,7 @@ | |||
|
|||
'use strict'; | |||
const common = require('../common'); | |||
const fixtures = require('../common/fixtures'); |
There was a problem hiding this comment.
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?
CI is showing green, but no tests were actually run. Something is not working on CI. Will have to run again after it's fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linter complained:
not ok 2 - /usr/home/iojs/build/workspace/node-test-linter/test/parallel/test-https-socket-options.js
---
message: '''fs'' is assigned a value but never used.'
severity: error
data:
line: 30
column: 7
ruleId: no-unused-vars
...
can you remove const fs = require('fs');
at line 30?
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: #15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Landed in bb9ed92 |
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: #15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: nodejs/node#15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: #15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: #15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
NINA 2017 Code and Learn session for first time contributors. This touched test/parallel/test-https-socket-options.js to replace common.fixturesDir PR-URL: #15882 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
NINA 2017 Code and Learn session for first time contributors. This
touched test/parallel/test-https-socket-options.js to replace
common.fixturesDir
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)