From cb66c2c02a550b07676e48a64c5c7fab7cfbca92 Mon Sep 17 00:00:00 2001 From: joalopez1206 Date: Thu, 24 Oct 2024 15:16:55 -0300 Subject: [PATCH] test: check nsid --- tests/edns_test.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/edns_test.rs b/tests/edns_test.rs index 4000108b..fa7b282d 100644 --- a/tests/edns_test.rs +++ b/tests/edns_test.rs @@ -98,7 +98,12 @@ async fn query_a_type_with_rrsig_edns() { assert_eq!(opt.get_name(), DomainName::new_from_str("")); assert_eq!(opt.get_rtype(), Rrtype::OPT); assert_eq!(opt.get_rclass(), Rclass::UNKNOWN(512)); - //println!("{}", opt); + if let Rdata::OPT(rdata) = opt.get_rdata() { + let rdata = rdata.clone(); + let (_,_,c) = &rdata.get_option()[0]; + // because the first query option is 8.8.8.8, it redirects to google public dns in scl chile + assert_eq!(std::str::from_utf8(c).unwrap(), "gpdns-scl") + } } }