foxcpp / go-mockdns

Boilerplate for testing of code involving DNS lookups, including unholy hacks to redirect net.Lookup* calls.
MIT License
42 stars 10 forks source link

Fallback on real DNS #18

Open l0kix2 opened 3 weeks ago

l0kix2 commented 3 weeks ago

Hi, I'm using library for mocking some particular DNS records in test (because in real application real DNS records exist and don't exist in my laptop). But I stumble upon a problem that mockdns mocks ALL dns requests, though I'd like to have an option for mockserver to mock only ones I've specified and fallback to the usual DNS resolving for other lookups.

foxcpp commented 3 weeks ago

Patches welcome