Skip to content
Closed
Changes from 1 commit
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
Next Next commit
CommonFixturesFix - Fixed references to common.fixturesDir in test-tl…
…s-client-getephemeralkeyinfo.js
  • Loading branch information
timothywisdom committed Oct 6, 2017
commit 14dfce5a33dcd88a5e21609469b6d6aee74f39ce
7 changes: 4 additions & 3 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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`);
}
Expand Down