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

test: move 'http' tests into subfolder #52875

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ overrides:
- files:
- es-module/*.js
- es-module/*.mjs
- parallel/**/*.js
- parallel/**/*.mjs
- parallel/*.js
- parallel/*.mjs
- sequential/*.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
require('../common');
require('../../common');
const http = require('http');
const net = require('net');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const net = require('net');
const http = require('http');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');

const server = http.createServer(common.mustNotCall());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');

let serverRes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');

const http = require('http');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const http = require('http');
const assert = require('assert');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');
require('../../common');

// This test ensures that `addRequest`'s Legacy API accepts `localAddress`
// correctly instead of accepting `path`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
const Countdown = require('../../common/countdown');

const server = http.createServer(common.mustCall((req, res) => {
req.resume();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Agent = http.Agent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
const Countdown = require('../../common/countdown');

const server = http.createServer(common.mustCall((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Flags: --expose-gc --expose-internals
'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');
const async_hooks = require('async_hooks');
const makeDuplexPair = require('../common/duplexpair');
const makeDuplexPair = require('../../common/duplexpair');

// Regression test for https://github.com/nodejs/node/issues/30122
// When a domain is attached to an http Agent’s ReusedHandle object, that
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Agent = http.Agent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');

// Sending `agent: false` when `port: null` is also passed in (i.e. the result
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

require('../common');
require('../../common');
const assert = require('assert');
const http = require('http');

const tmpdir = require('../common/tmpdir');
const tmpdir = require('../../common/tmpdir');

const agent = new http.Agent();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const { Agent } = require('_http_agent');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Agent = require('_http_agent').Agent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
const common = require('../common');
const Countdown = require('../common/countdown');
const common = require('../../common');
const Countdown = require('../../common/countdown');

// This test ensures that the `maxSockets` value for `http.Agent` is respected.
// https://github.com/nodejs/node/issues/4050
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
const Countdown = require('../../common/countdown');

const agent = new http.Agent({
keepAlive: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
const Countdown = require('../../common/countdown');

assert.throws(() => new http.Agent({
maxTotalSockets: 'test',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');
const url = require('url');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');

const server = http.createServer(common.mustCall((req, res) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const { mustCall } = require('../common');
const { mustCall } = require('../../common');

const http = require('http');
const { strictEqual } = require('assert');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const net = require('net');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { mustCall } = require('../common');
const { mustCall } = require('../../common');
const { strictEqual } = require('assert');
const { Agent, get } = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const http = require('http');
const net = require('net');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const http = require('http');
const net = require('net');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const Countdown = require('../common/countdown');
const common = require('../../common');
const Countdown = require('../../common/countdown');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
const common = require('../../common');

// This test ensures that the http-parser doesn't expect a body when
// a 304 Not Modified response has a non-zero Content-Length header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const http = require('http');
const assert = require('assert');
const Countdown = require('../common/countdown');
const Countdown = require('../../common/countdown');

// first 204 or 304 works, subsequent anything fails
const codes = [204, 200];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const common = require('../common');
const { parseDNSPacket, writeDNSPacket } = require('../common/dns');
const common = require('../../common');
const { parseDNSPacket, writeDNSPacket } = require('../../common/dns');

const assert = require('assert');
const dgram = require('dgram');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');
const net = require('net');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const assert = require('assert');
const http = require('http');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
const common = require('../../common');
const http = require('http');
const net = require('net');
const assert = require('assert');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
// http://groups.google.com/group/nodejs/browse_thread/thread/f66cd3c960406919
const common = require('../common');
const common = require('../../common');
if (!common.hasCrypto)
common.skip('missing crypto');

Expand Down Expand Up @@ -37,7 +37,7 @@ if (process.argv[2] === 'shasum') {
const http = require('http');
const cp = require('child_process');

const tmpdir = require('../common/tmpdir');
const tmpdir = require('../../common/tmpdir');

const filename = tmpdir.resolve('big');
let server;
Expand Down
Loading