[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Best practices for DEP-8 tests involving DNS



Hi,

As some of you might know if you've seen me around, I have had an obsession with DNS lately. I want to write high-quality self-contained autopkgtests that work offline and which leverage DNS records, especially less common ones.

One way I was thinking about doing it was like this:
 * Set the appropriate Restrictions in debian/tests/control (we may need several)
 * Modify /etc/resolv.conf so that requests are resolved with a nameserver on the loopback interface
 * Set up some kind of local nameserver that has the records I want to test (???)
 * Run the program in question which uses DNS records and check that it's getting the appropriate records and using them correctly

For example, if I wanted to test that DANE works with self-signed certificates with some program or library, I could create a _443._tcp.localhost TLSA record with the right information, spin up an HTTPS server, and check that the client program or library is able to do a download.

My question mostly lies in the (???) part. How do I set up a DNS server that will resolve potentially bogus names of my choosing? I know this is the debian-ci list, but thought maybe you folks would know about how to test DNS software.

Thanks 

Attachment: signature.asc
Description: This is a digitally signed message part

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: