smtpd/qpsmtpd — pull request #118 by flimzy (2014-09-18 00:29:22+00:00)
Title: Makes DNS tests non dependant on the network

This adds a new Net::DNS::Resolver subclass called Test::FakeResolver, which reads locally cached static DNS results, rather than querying the network. This is desirable for unit tests for a number of reasons:

1. It makes tests not depend on the network, which may not always be available in some build/test environments
2. It makes tests not depend on DNS service which may not always respond as expected, or quickly, depending on the environment (notably certain ISPs return positive results in lieu of NXDOMAIN results)
3. It makes tests run much faster!

I began this work to address #113 , but its impact goes well beyond those tests which were failing on my machine (due specifically to my ISP's munging of NXDOMAINs).