Skip to content

Commit

Permalink
fix: update RRset tests to ensure consistent TTL values and add depre…
Browse files Browse the repository at this point in the history
…cation notice
  • Loading branch information
joalopez1206 committed Nov 11, 2024
1 parent 6efaaa1 commit 144f33a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/message/rrset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,18 @@ mod rrset_test {
rr.set_rclass(Rclass::IN);
rr.set_ttl(3600);
ans_rrs.push(rr);

let ardata = ARdata::new_from_addr(IpAddr::from([93,184,215,15]));
let rdata = Rdata::A(ardata.clone());
let mut rr = ResourceRecord::new(rdata);
rr.set_rdlength(ardata.to_bytes().len() as u16);
rr.set_name(DomainName::new_from_str("example.com"));
rr.set_type_code(Rrtype::A);
rr.set_rclass(Rclass::IN);
// This behaviour is deprecated! all the ttls should be the same in an RRset
rr.set_ttl(2700);
ans_rrs.push(rr);

// add answer signature
let mut rrsig_rdata = rrsig_rdata::RRSIGRdata::new();
rrsig_rdata.set_type_covered(Rrtype::A);
Expand Down

0 comments on commit 144f33a

Please sign in to comment.