Fixed CNAME resolution test.

pull/156/head v0.6.6
Revertron 3 years ago
parent 7b79f86e17
commit a1099e54f0

@ -497,18 +497,12 @@ mod tests {
// A successful resolve, that also resolves a CNAME through recursive lookup
{
let res = execute_query(Arc::clone(&context), &build_query("www.microsoft.com", QueryType::CNAME));
assert_eq!(2, res.answers.len());
dbg!(&res);
assert_eq!(1, res.answers.len());
match res.answers[0] {
DnsRecord::CNAME { ref domain, .. } => {
assert_eq!("www.microsoft.com", domain);
}
_ => panic!()
}
match res.answers[1] {
DnsRecord::A { ref domain, .. } => {
assert_eq!("cdn.microsoft.com", domain);
DnsRecord::CNAME { ref host, .. } => {
assert_eq!("cdn.microsoft.com", host);
}
_ => panic!()
}

Loading…
Cancel
Save