From 36893bf2b7d05d217e8cc487518ca155407786e0 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Wed, 8 Oct 2025 18:41:47 -0700 Subject: [PATCH] Tests: making sure dns stub in js_fetch_https.t resolves only known hosts. --- nginx/t/js_fetch_https.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nginx/t/js_fetch_https.t b/nginx/t/js_fetch_https.t index 42b5acbb..43dcb9f8 100644 --- a/nginx/t/js_fetch_https.t +++ b/nginx/t/js_fetch_https.t @@ -241,8 +241,15 @@ sub reply_handler { my $name = join('.', @name); - if ($type == A) { - push @rdata, rd_addr($ttl, '127.0.0.1'); + if ($name eq 'default.example.com' || $name eq '1.example.com') { + if ($type == A) { + push @rdata, rd_addr($ttl, '127.0.0.1'); + } + + } elsif ($name eq 'localhost') { + if ($type == A) { + push @rdata, rd_addr($ttl, '127.0.0.1'); + } } $len = @name; -- 2.47.3