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: use common.fixtures #15965

Closed

Conversation

obensource
Copy link
Member

Replaces use of common.fixturesDir with common.fixtures module in test/parallel/test-tls-max-send-fragment.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@obensource obensource force-pushed the bpm/common-fixtures-module-refactor branch from e9cd496 to 6a98d26 Compare October 6, 2017 17:53
@mscdex mscdex added the tls Issues and PRs related to the tls 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 6, 2017
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

There is actually a dedicated function to load the keys directly (readKey). Please use that instead.

@obensource
Copy link
Member Author

obensource commented Oct 8, 2017

@BridgeAR done! Note: something that is slightly confusing in this context is that readKey handles both certs and keys, though it makes implicit sense since they exist in /keys. ¯_(ツ)_/¯

@joyeecheung
Copy link
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/10485/


const buf = Buffer.allocUnsafe(10000);
let received = 0;
const maxChunk = 768;

const server = tls.createServer({
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
key: fixtures.readKey('/agent1-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.

I think you can drop the leading slashes.

@tniessen
Copy link
Member

tniessen commented Oct 9, 2017

@obensource Certificates are essentially keys with some metadata, so it is kind of an abstraction.

@obensource
Copy link
Member Author

@tniessen rad, that makes sense. Thanks! 🍻

@Trott
Copy link
Member

Trott commented Oct 9, 2017

CI: https://ci.nodejs.org/job/node-test-pull-request/10521/

@obensource
Copy link
Member Author

obensource commented Oct 9, 2017

@joyeecheung fyi CI 10485 failure here:

479 | sequential/test-async-wrap-getasyncid |  
-- | -- | --
duration_ms0.2severitycrashedstackoh no! exit code: CRASHED |   | duration_ms | 0.2 |   | severity | crashed |   | stack | oh no! exit code: CRASHED
  | duration_ms | 0.2
  | severity | crashed
  | stack | oh no! exit code: CRASHED

Related to reopened issue: #13020

Not something to additionally address in this tls test PR I'd guess–hence approval?

Edited by Trott for formatting.

@BridgeAR BridgeAR self-assigned this Oct 9, 2017
BridgeAR pushed a commit that referenced this pull request Oct 9, 2017
PR-URL: #15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@BridgeAR
Copy link
Member

BridgeAR commented Oct 9, 2017

Landed in 17857d4

Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 !

@BridgeAR BridgeAR closed this Oct 9, 2017
@obensource
Copy link
Member Author

@BridgeAR Wahoo! Thank you! 🎉🎉🎉

So excited to jump in–thanks for reviewing! 😎

MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
PR-URL: #15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@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#15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 14, 2017
PR-URL: #15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[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: #15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
PR-URL: #15965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
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.

9 participants