Skip to content

Commit 4be1662

Browse files
committed
fixup! http: match subdomains for plain NO_PROXY entries
Assert that the negative NO_PROXY domain tests actually go through the proxy: both paths return 200 from the same server, so assert on the absence of the custom lookup log line instead. Assisted-by: Claude Fable 5 Signed-off-by: Nikita Snetkov <lukyanish@gmail.com>
1 parent 734e21b commit 4be1662

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎test/client-proxy/test-http-proxy-request-no-proxy-domain.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ await once(proxy, 'listening');
187187
// The request should go through the proxy (not bypass it),
188188
// because badexample.com is not a subdomain of example.com.
189189
assert.match(stdout, /Status Code: 200/);
190+
assert.doesNotMatch(stdout, /Resolving lookup for badexample\.com/);
190191
assert.strictEqual(stderr.trim(), '');
191192
assert.strictEqual(code, 0);
192193
assert.strictEqual(signal, null);
@@ -206,6 +207,7 @@ await once(proxy, 'listening');
206207
// The request should go through the proxy (not bypass it),
207208
// because notexample.com is not a subdomain of example.com.
208209
assert.match(stdout, /Status Code: 200/);
210+
assert.doesNotMatch(stdout, /Resolving lookup for notexample\.com/);
209211
assert.strictEqual(stderr.trim(), '');
210212
assert.strictEqual(code, 0);
211213
assert.strictEqual(signal, null);
@@ -223,6 +225,7 @@ await once(proxy, 'listening');
223225
// The request should go through the proxy (not bypass it),
224226
// because badexample.com is not a subdomain of example.com.
225227
assert.match(stdout, /Status Code: 200/);
228+
assert.doesNotMatch(stdout, /Resolving lookup for badexample\.com/);
226229
assert.strictEqual(stderr.trim(), '');
227230
assert.strictEqual(code, 0);
228231
assert.strictEqual(signal, null);

0 commit comments

Comments
 (0)