From 980dc7357e1b3da4225d1aa94b05b32f0030c1ea Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 31 May 2023 15:52:55 -0400 Subject: [PATCH 1/2] test: fix error codes for test-dns-idna2008 --- test/internet/test-dns-idna2008.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js index 16c8933073139a..fb93b7a97ac666 100644 --- a/test/internet/test-dns-idna2008.js +++ b/test/internet/test-dns-idna2008.js @@ -41,16 +41,16 @@ dns.promises.lookup(fixture.hostname, { family: fixture.family }) .then(({ address }) => { assert.strictEqual(address, fixture.expectedAddress); }, (err) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND ENOTFOUND.de')); } else { throw err; } }).finally(mustCall()); dns.resolve4(fixture.hostname, mustCall((err, addresses) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); return; } assert.ifError(err); @@ -61,8 +61,8 @@ const p = new dns.promises.Resolver().resolve4(fixture.hostname); p.then((addresses) => { assert.deepStrictEqual(addresses, [fixture.expectedAddress]); }, (err) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); } else { throw err; } From 51b5fdc51888c51b46b04c4fa3ed5eb8635cf619 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 31 May 2023 16:20:06 -0400 Subject: [PATCH 2/2] fixup! test: fix error codes for test-dns-idna2008 --- test/internet/test-dns-idna2008.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js index fb93b7a97ac666..619c02cd2444d9 100644 --- a/test/internet/test-dns-idna2008.js +++ b/test/internet/test-dns-idna2008.js @@ -42,7 +42,7 @@ dns.promises.lookup(fixture.hostname, { family: fixture.family }) assert.strictEqual(address, fixture.expectedAddress); }, (err) => { if (err && err.code === 'ENOTFOUND') { - assert.ok(err.message.includes('queryA ENOTFOUND ENOTFOUND.de')); + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); } else { throw err; }