From 0a159bea15473254399e80c8e1536c0bb7f80fcf Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Wed, 20 Jan 2021 23:47:17 +0900 Subject: fix(ops/net): fix panic in op_dns_resolve (#9187) --- cli/tests/resolve_dns.ts | 6 ++++++ cli/tests/resolve_dns.ts.out | 1 + 2 files changed, 7 insertions(+) (limited to 'cli') diff --git a/cli/tests/resolve_dns.ts b/cli/tests/resolve_dns.ts index 35abfc803..7865d9680 100644 --- a/cli/tests/resolve_dns.ts +++ b/cli/tests/resolve_dns.ts @@ -34,3 +34,9 @@ console.log(JSON.stringify(srv)); console.log("TXT"); console.log(JSON.stringify(txt)); + +try { + await Deno.resolveDns("not-found-example.com", "A", nameServer); +} catch (e) { + console.log("Error thrown for not-found-example.com"); +} diff --git a/cli/tests/resolve_dns.ts.out b/cli/tests/resolve_dns.ts.out index 10bd78e8a..78381e6c6 100644 --- a/cli/tests/resolve_dns.ts.out +++ b/cli/tests/resolve_dns.ts.out @@ -14,3 +14,4 @@ SRV [{"priority":0,"weight":100,"port":1234,"target":"srv.com."}] TXT [["foo","bar"]] +Error thrown for not-found-example.com -- cgit v1.2.3