summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorKaveh <hamidrkp@riseup.net>2024-11-07 03:19:32 +0330
committerGitHub <noreply@github.com>2024-11-06 15:49:32 -0800
commitdb53ec230d2de1b3be50230d4c00e83a03df686f (patch)
tree213a4e55fed1385ac4c0d8e48a0d5af14a37ff80 /tests/integration
parentb3a3d84ce249ff126f92e7a0849ec0a6ce26e973 (diff)
refactor(ext/net): Use hickory dns instead of unmaintained trust-dns (#26741)
This PR replaces the unmaintained and rebranded `trust-dns` to `hickory` for resolver in `deno_net`.
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/run_tests.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index 686fbabcf..e29ecc486 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -16,12 +16,11 @@ use deno_tls::rustls;
use deno_tls::rustls::ClientConnection;
use deno_tls::rustls_pemfile;
use deno_tls::TlsStream;
+use hickory_client::serialize::txt::Parser;
use pretty_assertions::assert_eq;
use test_util as util;
use test_util::itest;
use test_util::TempDir;
-use trust_dns_client::serialize::txt::Lexer;
-use trust_dns_client::serialize::txt::Parser;
use util::assert_contains;
use util::assert_not_contains;
use util::PathRef;
@@ -2175,6 +2174,11 @@ fn basic_auth_tokens() {
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_resolve_dns() {
+ use hickory_server::authority::Catalog;
+ use hickory_server::authority::ZoneType;
+ use hickory_server::proto::rr::Name;
+ use hickory_server::store::in_memory::InMemoryAuthority;
+ use hickory_server::ServerFuture;
use std::net::SocketAddr;
use std::str::FromStr;
use std::sync::Arc;
@@ -2182,11 +2186,6 @@ async fn test_resolve_dns() {
use tokio::net::TcpListener;
use tokio::net::UdpSocket;
use tokio::sync::oneshot;
- use trust_dns_server::authority::Catalog;
- use trust_dns_server::authority::ZoneType;
- use trust_dns_server::proto::rr::Name;
- use trust_dns_server::store::in_memory::InMemoryAuthority;
- use trust_dns_server::ServerFuture;
const DNS_PORT: u16 = 4553;
@@ -2196,9 +2195,12 @@ async fn test_resolve_dns() {
util::testdata_path().join("run/resolve_dns.zone.in"),
)
.unwrap();
- let lexer = Lexer::new(&zone_file);
- let records =
- Parser::new().parse(lexer, Some(Name::from_str("example.com").unwrap()));
+ let records = Parser::new(
+ &zone_file,
+ None,
+ Some(Name::from_str("example.com").unwrap()),
+ )
+ .parse();
if records.is_err() {
panic!("failed to parse: {:?}", records.err())
}