Open
Description
Our current mocking for unit tests is at the highest level of abstraction (DoSingleDstServerLookup
) which avoids testing a lot of inner logic. After seeing #449, I think we need a way to ensure that some guarantees about how ZDNS is supposed to operate hold true.
For example:
- TCP/TLS/HTTPS sessions should be re-used
./zdns A google.com yahoo.com microsoft.com apple.com eBay.com zdns-testing.com Cloudflare.com--threads=2 --tcp-only
should result in only 2 TCP handshakes taking place
- GTLD servers should only be queried once from the roots per-gTLD
- google.com and yahoo.com both have the same gTLD. In
./zdns A google.com yahoo.com --threads=1 --iterative
, ZDNS should only make 1 query to the set of root IP addresses - This can be extended to include 2 sub-domains of
google.com
, and we should only query the.com
name servers once forgoogle.com
's nameservers
- google.com and yahoo.com both have the same gTLD. In
Talked with @zakird and thinking the best approach is to introduce some sort of mocking for reliable tests.
Activity