Skip to content

Commit b5f3054

Browse files
r0binaryBridgeAR
authored andcommitted
test: use fixtures.readKey
Replace the common.fixturesDir by fixtures.readKey in http2 subsystem test 'server startup'. PR-URL: #15892 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent c11a30d commit b5f3054

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/parallel/test-http2-server-startup.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,19 @@
55
// other than start listening.
66

77
const common = require('../common');
8+
const commonFixtures = require('../common/fixtures');
89

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

1213
const assert = require('assert');
1314
const http2 = require('http2');
14-
const path = require('path');
1515
const tls = require('tls');
1616
const net = require('net');
17-
const fs = require('fs');
1817

1918
const options = {
20-
key: fs.readFileSync(
21-
path.resolve(common.fixturesDir, 'keys/agent2-key.pem')),
22-
cert: fs.readFileSync(
23-
path.resolve(common.fixturesDir, 'keys/agent2-cert.pem'))
19+
key: commonFixtures.readKey('agent2-key.pem'),
20+
cert: commonFixtures.readKey('agent2-cert.pem')
2421
};
2522

2623
// There should not be any throws

0 commit comments

Comments
 (0)