GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: show more information in test-http2-debug upon failure · nodejs/node@23474cb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http2-debug.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-http2-debug.js‎

Copy file name to clipboard
+23-19Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
'use strict';
2+
23
const common = require('../common');
34
if (!common.hasCrypto)
45
common.skip('missing crypto');
56
const assert = require('assert');
6-
const child_process = require('child_process');
7+
const { spawnSyncAndAssert } = require('../common/child_process');
78
const path = require('path');
89

9-
process.env.NODE_DEBUG_NATIVE = 'http2';
10-
process.env.NODE_DEBUG = 'http2';
11-
const { stdout, stderr } = child_process.spawnSync(process.execPath, [
10+
spawnSyncAndAssert(process.execPath, [
1211
path.resolve(__dirname, 'test-http2-ping.js'),
13-
], { encoding: 'utf8' });
14-
15-
assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\.\r?\n/),
16-
stderr);
17-
assert(stderr.match(/Http2Session client \(\d+\) handling data frame for stream \d+\r?\n/),
18-
stderr);
19-
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting\r?\n/),
20-
stderr);
21-
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] closed with code 0\r?\n/),
22-
stderr);
23-
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] closed with code 0\r?\n/),
24-
stderr);
25-
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] tearing down stream\r?\n/),
26-
stderr);
27-
assert.strictEqual(stdout.trim(), '');
12+
], {
13+
env: {
14+
...process.env,
15+
NODE_DEBUG: 'http2',
16+
NODE_DEBUG_NATIVE: 'http2',
17+
},
18+
}, {
19+
trim: true,
20+
stderr(output) {
21+
assert.match(output,
22+
/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data/);
23+
assert.match(output, /\(such as passwords, tokens and authentication headers\) in the resulting log\.\r?\n/);
24+
assert.match(output, /Http2Session client \(\d+\) handling data frame for stream \d+\r?\n/);
25+
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting\r?\n/);
26+
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] closed with code 0\r?\n/);
27+
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] closed with code 0\r?\n/);
28+
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] tearing down stream\r?\n/);
29+
},
30+
stdout: ''
31+
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.