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

CommonFixturesFix - Fixed references to common.fixturesDir in test-tl… #16041

Closed
wants to merge 5 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions test/parallel/test-tls-client-getephemeralkeyinfo.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
'use strict';
const common = require('../common');
const commonFixturesDir = require('../common.fixtures').fixturesDir;
Copy link
Member

Choose a reason for hiding this comment

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

Optional - it would be nice to use destructuring here as in

const { fixturesDir } = require('../common.fixtures').fixturesDir;

if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');
const tls = require('tls');
const fs = require('fs');

const key = fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`);
const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`);
const key = fs.readFileSync(`${commonFixturesDir}/keys/agent2-key.pem`);
const cert = fs.readFileSync(`${commonFixturesDir}/keys/agent2-cert.pem`);
Copy link
Member

@BridgeAR BridgeAR Oct 9, 2017

Choose a reason for hiding this comment

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

This should actually use the fixtures.readKey function. I fix this while landing.

Copy link
Member

Choose a reason for hiding this comment

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

@timothywisdom it would actually be nice if you could fix this test.


let ntests = 0;
let nsuccess = 0;

function loadDHParam(n) {
let path = common.fixturesDir;
let path = commonFixturesDir;
if (n !== 'error') path += '/keys';
return fs.readFileSync(`${path}/dh${n}.pem`);
}
@@ -84,7 +85,7 @@ function testECDHE256() {
}

function testECDHE512() {
test(521, 'ECDH', 'secp521r1', null);
test(512, 'ECDH', 'secp512r1', null);
ntests++;
}