summaryrefslogtreecommitdiff
path: root/cli/tests/integration/mod.rs
diff options
context:
space:
mode:
authorThanapat Chotipun <66824385+PatrickChoDev@users.noreply.github.com>2022-05-04 01:04:20 +0700
committerGitHub <noreply@github.com>2022-05-03 20:04:20 +0200
commite3954df8c5f8a5dab7102ebae77dfc217fb9f098 (patch)
treeded004147738a564f349c9850ad24462bae76128 /cli/tests/integration/mod.rs
parent3f08a40412d89bd54222ad51fc1aaeb508e2e5e7 (diff)
feat(ext/net): add "NS" record support in Deno.resolveDns API (#14372)
Diffstat (limited to 'cli/tests/integration/mod.rs')
-rw-r--r--cli/tests/integration/mod.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index ffd7e3596..3de33b381 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -817,7 +817,6 @@ async fn test_resolve_dns() {
use std::net::SocketAddr;
use std::str::FromStr;
use std::sync::Arc;
- use std::sync::RwLock;
use std::time::Duration;
use tokio::net::TcpListener;
use tokio::net::UdpSocket;
@@ -910,6 +909,15 @@ async fn test_resolve_dns() {
record_set,
);
+ // Inserts NS record
+ let rdata = RData::NS(Name::from_str("ns1.ns.com").unwrap());
+ let record = Record::from_rdata(lookup_name.clone(), u32::MAX, rdata);
+ let record_set = RecordSet::from(record);
+ map.insert(
+ RrKey::new(lookup_name_lower.clone(), RecordType::NS),
+ record_set,
+ );
+
// Inserts PTR record
let rdata = RData::PTR(Name::from_str("ptr.com").unwrap());
let record = Record::from_rdata(
@@ -951,7 +959,7 @@ async fn test_resolve_dns() {
map
};
- let authority = Box::new(Arc::new(RwLock::new(
+ let authority = Box::new(Arc::new(
InMemoryAuthority::new(
Name::from_str("com").unwrap(),
records,
@@ -959,7 +967,7 @@ async fn test_resolve_dns() {
false,
)
.unwrap(),
- )));
+ ));
let mut c = Catalog::new();
c.upsert(Name::root().into(), authority);
c