Skip to content

Commit 0e8be83

Browse files
committed
Improve test reliability
1 parent 0dc4984 commit 0e8be83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/integration/proxying/https-proxying.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,18 +521,18 @@ nodeOnly(() => {
521521
it("should return a 502 for failing upstream requests by default", async () => {
522522
await server.forAnyRequest().thenPassThrough();
523523

524-
const response = await http2ProxyRequest(server, `https://invalid.example`);
524+
const response = await http2ProxyRequest(server, `https://example.invalid`);
525525

526526
expect(response.headers[':status']).to.equal(502);
527-
expect(response.body.toString('utf8')).to.include("ENOTFOUND invalid.example");
527+
expect(response.body.toString('utf8')).to.include("ENOTFOUND example.invalid");
528528
});
529529

530530
it("should simulate connection errors for failing upstream requests if enabled", async () => {
531531
await server.forAnyRequest().thenPassThrough({
532532
simulateConnectionErrors: true
533533
});
534534

535-
const result = await http2ProxyRequest(server, `https://invalid.example`)
535+
const result = await http2ProxyRequest(server, `https://example.invalid`)
536536
.catch(e => e);
537537

538538
expect(result).to.be.instanceof(Error);

test/integration/proxying/socks-proxying.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ nodeOnly(() => {
213213
port: remoteServer.port
214214
});
215215

216-
expect((await seenFinalRequest).url).to.equal(`http://fixed.localhost:8000/`); // Host header updated
216+
expect((await seenFinalRequest).url).to.equal(`http://fixed.localhost:${remoteServer.port}/`); // Host header updated
217217
expect((await passthroughEvent).hostname).to.equal('fixed.localhost');
218218
expect((await passthroughEvent).port).to.equal(remoteServer.port.toString());
219219
});

0 commit comments

Comments
 (0)