Skip to content

Commit c617090

Browse files
committed
Check & log HTTP/2 keylog test response failures
Something seems to make this test slightly unstable - best guess is that the real connection is failing, so let's actually check it before we continue the rest of the test.
1 parent 5ec308c commit c617090

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/integration/https.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,12 @@ describe("When configured for HTTPS", () => {
545545

546546
it("should log upstream HTTP/2 TLS keys to the file", async () => {
547547
// Make an HTTP request, but proxy to an HTTP2-only HTTPS server:
548-
await server.forGet('/').thenForwardTo('https://http2.testserver.host');
548+
await server.forAnyRequest().thenForwardTo('https://http2.testserver.host');
549549

550-
const client = http2.connect(`http://localhost:${server.port}`);
551-
const req = client.request();
552-
await getHttp2Response(req);
550+
const client = http2.connect(`http://localhost:${server.port}/`);
551+
const req = client.request({ ':path': '/status/200' });
552+
const res = await getHttp2Response(req);
553+
expect(res[':status']).to.equal(200);
553554

554555
const keyLogContents = await fs.readFile(keyLogFile, 'utf8');
555556

0 commit comments

Comments
 (0)