summaryrefslogtreecommitdiff
path: root/tests/test_resolver.py
Commit message (Collapse)AuthorAgeFilesLines
* Add make_resolver_at() and resolve_at(). (#926)Bob Halley2023-04-191-0/+16
|
* Add dns.resolver.resolve_name(). (#903)Brian Wellington2023-03-101-0/+28
| | | | | | | | | | | | | * Add dns.resolver.resolve_name(). * Add missing type annotations. * Add async resolve_name(). * Replace List[Answer] with HostAnswers. * Switch addresses_and_families() tuple order * Fix comment.
* Resolver "nameserver" object support. (#897)Bob Halley2023-02-251-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | * Resolver "nameserver" object support. This turns the list of nameserver strings in the resolver into a tuple of nameserver objects, which abstract away making queries to a nameserver of a given type. The resolver's legacy nameserver list is "enriched" into a tuple of nameserver objects whenever it is set. Note that you cannot mutate the object other than by setting, e.g. res.nameservers.append("1.2.3.4") will not work. Error message accumulation has been updated to refer to the nameservers using a descriptive text form. * doco fix * more doco fixes * do enrichment at Resolution time * require a later mypy, fix type issues * add nameserver doc
* Improve network checking [#812].Bob Halley2022-06-041-0/+1
|
* Add tests.util.is_internet_reachable()Benjamin Drung2022-05-161-14/+7
| | | | | | Introduce `tests.util.is_internet_reachable` to avoid duplicate code. Signed-off-by: Benjamin Drung <bdrung@ubuntu.com>
* black autoformattingBob Halley2022-03-151-257/+320
|
* Try to appease older unittestIshai2022-01-131-1/+1
|
* Add resolver edns optionsIshai2022-01-101-1/+9
|
* remove out-of-date commentBob Halley2021-11-161-2/+0
|
* Add WMI-based method for finding resolver info on Windows.win32utilBob Halley2021-11-091-9/+7
|
* Handle DHCP servers returning domains prefixed by dot [#687].Bob Halley2021-11-071-0/+10
|
* Validate resolver nameservers when set [Issue #699].Bob Halley2021-10-241-0/+10
|
* If a negative response has an SOA in the authority section, thenBob Halley2021-07-111-1/+74
| | | | | | | zone_for_name() will now use it to make the search more efficient. zone_for_name() now has an optional lifetime parameter which limits the total time that can be spent resolving.
* add skip rule to testResolverNoNameserversBob Halley2021-06-151-0/+2
|
* Try to skip dangling CNAME tests if systemd-resolved is running. [Issue #658]Bob Halley2021-06-111-0/+13
|
* Test LifeTimeout and NoNameservers excetpions.lifetime_timeoutBob Halley2021-05-011-0/+61
|
* Apply the resolver search list, domain, and ndots settings in the same wayBob Halley2020-07-271-2/+22
| | | | that the BIND stub resolver library does.
* more resolver override testingBob Halley2020-07-261-1/+6
|
* more minor resolver coverageBob Halley2020-07-251-4/+47
|
* more resolver coverage improvementsBob Halley2020-07-221-2/+27
|
* Make resolver use_edns() conform to its docstring; slightly improve ↵Bob Halley2020-07-221-0/+10
| | | | use_edns() logic.
* Fix Answer constructor invocations that missed an API change.Bob Halley2020-07-221-4/+2
|
* Increase branch coverage of the resolver.Bob Halley2020-07-221-29/+96
| | | | | | | Speed up test resolver by around 6 seconds by mocking the clock. Improve the cleaning test to verify that it really was cleaning that removed the entry, and not get detecting the expiration.
* unify chaining codeBob Halley2020-07-211-2/+14
|
* Set EDNS default payload to 1232.Bob Halley2020-07-201-1/+1
|
* Fix resolver EDNS0 payload size when EDNS0 enabled by resolv.conf.Bob Halley2020-07-201-0/+1
| | | | [Issue #546]
* better test styleBob Halley2020-07-201-3/+3
|
* Add canonical_name() method to resolver.Bob Halley2020-07-201-0/+14
|
* cache statisticsBob Halley2020-07-191-0/+35
|
* Use the selectors module.Brian Wellington2020-07-171-9/+9
| | | | | | Previously, there was code to either use select.select or select.poll, depending on OS. This changes it to use the selectors module, using either SelectSelector or PollSelector, but sharing code otherwise.
* Don't read resolv.conf in tests that don't use it.Brian Wellington2020-07-081-5/+6
|
* increase resolver coverageBob Halley2020-07-011-0/+58
|
* Use `configure=False` in tests to skip reading /etc/resolv.confLumir Balhar2020-06-251-5/+5
|
* Add more functionality to nanonameserver.Brian Wellington2020-06-231-7/+6
| | | | | | | | | | | - When no port is specified, pick the same port for UDP and TCP, so that TCP fallback can be tested. - Change handlers to get a single Request object instead of individual parameters. The Request object contains the message, peer, and connection_type previously passed, and also adds the local address and wire format message. Additionally, it provides convenient properties for accessing the question.
* make read_resolv_conf() tests work on win32 tooBob Halley2020-06-231-2/+4
|
* merge mostly redundant resolv.conf test into existing testBob Halley2020-06-231-35/+15
|
* test resolv.conf settingsBob Halley2020-06-231-0/+20
|
* improve resolver coverageBob Halley2020-06-201-0/+19
|
* try a different type for NoData test to make azure happierBob Halley2020-06-201-2/+2
|
* try a different type for NoData test to make azure happierBob Halley2020-06-201-1/+1
|
* improve e164 coverageBob Halley2020-06-191-1/+8
|
* Improve resolver coverage by:Bob Halley2020-06-161-9/+7
| | | | | | | | | Testing more stuff. Ignoring coverage of Windows as we have no way to integrate coverage data from windows test runs at this time. Ignoring other not important things.
* pass peer and connection type to nanoserver handle()Bob Halley2020-06-021-1/+1
|
* switch to relative import for nanonameservernanonameserverBob Halley2020-06-011-1/+1
|
* add nanonamserver, a handy testing toolBob Halley2020-05-311-4/+49
|
* test cache hit with live resolverBob Halley2020-05-291-0/+10
|
* a bit more cache coverageBob Halley2020-05-281-0/+55
|
* only do multiple I/O backend testing for live tests, as testing everything 3 ↵Bob Halley2020-05-281-67/+71
| | | | times is pointless work
* add one more live resolver test (for NXDOMAIN)Bob Halley2020-05-281-0/+9
|
* tests: resolver Nodata answersPetr Špaček2020-05-281-0/+18
|