mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Turn off deadline for wildcard tests
Tests that query BIND need much longer deadline to account for retries,
the default 200ms won't work.
(cherry picked from commit d2e0043ec3
)
This commit is contained in:
@@ -47,7 +47,7 @@ try:
|
|||||||
pytest.importorskip("hypothesis")
|
pytest.importorskip("hypothesis")
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pytest.importorskip("hypothesis", minversion="4.41.2")
|
pytest.importorskip("hypothesis", minversion="4.41.2")
|
||||||
from hypothesis import assume, example, given
|
from hypothesis import assume, example, given, settings
|
||||||
|
|
||||||
from isctest.hypothesis.strategies import dns_names, dns_rdatatypes_without_meta
|
from isctest.hypothesis.strategies import dns_names, dns_rdatatypes_without_meta
|
||||||
import isctest.check
|
import isctest.check
|
||||||
@@ -63,6 +63,7 @@ IP_ADDR = "10.53.0.1"
|
|||||||
TIMEOUT = 5 # seconds, just a sanity check
|
TIMEOUT = 5 # seconds, just a sanity check
|
||||||
|
|
||||||
|
|
||||||
|
@settings(deadline=None)
|
||||||
@given(name=dns_names(suffix=SUFFIX), rdtype=dns_rdatatypes_without_meta)
|
@given(name=dns_names(suffix=SUFFIX), rdtype=dns_rdatatypes_without_meta)
|
||||||
def test_wildcard_rdtype_mismatch(
|
def test_wildcard_rdtype_mismatch(
|
||||||
name: dns.name.Name, rdtype: dns.rdatatype.RdataType, named_port: int
|
name: dns.name.Name, rdtype: dns.rdatatype.RdataType, named_port: int
|
||||||
@@ -90,6 +91,7 @@ def test_wildcard_rdtype_mismatch(
|
|||||||
isctest.check.empty_answer(response_msg)
|
isctest.check.empty_answer(response_msg)
|
||||||
|
|
||||||
|
|
||||||
|
@settings(deadline=None)
|
||||||
@given(name=dns_names(suffix=SUFFIX, min_labels=len(SUFFIX) + 1))
|
@given(name=dns_names(suffix=SUFFIX, min_labels=len(SUFFIX) + 1))
|
||||||
def test_wildcard_match(name: dns.name.Name, named_port: int) -> None:
|
def test_wildcard_match(name: dns.name.Name, named_port: int) -> None:
|
||||||
"""Any label with maching rdtype must result in wildcard data in answer."""
|
"""Any label with maching rdtype must result in wildcard data in answer."""
|
||||||
@@ -116,6 +118,7 @@ def test_wildcard_match(name: dns.name.Name, named_port: int) -> None:
|
|||||||
|
|
||||||
|
|
||||||
# Force the `*.*.allwild.test.` corner case to be checked.
|
# Force the `*.*.allwild.test.` corner case to be checked.
|
||||||
|
@settings(deadline=None)
|
||||||
@example(name=isctest.name.prepend_label("*", isctest.name.prepend_label("*", SUFFIX)))
|
@example(name=isctest.name.prepend_label("*", isctest.name.prepend_label("*", SUFFIX)))
|
||||||
@given(
|
@given(
|
||||||
name=dns_names(
|
name=dns_names(
|
||||||
@@ -138,6 +141,7 @@ NESTED_SUFFIX = dns.name.from_text("*.*.nestedwild.test.")
|
|||||||
|
|
||||||
|
|
||||||
# Force `*.*.*.nestedwild.test.` to be checked.
|
# Force `*.*.*.nestedwild.test.` to be checked.
|
||||||
|
@settings(deadline=None)
|
||||||
@example(name=isctest.name.prepend_label("*", NESTED_SUFFIX))
|
@example(name=isctest.name.prepend_label("*", NESTED_SUFFIX))
|
||||||
@given(name=dns_names(suffix=NESTED_SUFFIX, min_labels=len(NESTED_SUFFIX) + 1))
|
@given(name=dns_names(suffix=NESTED_SUFFIX, min_labels=len(NESTED_SUFFIX) + 1))
|
||||||
def test_name_in_between_wildcards(name: dns.name.Name, named_port: int) -> None:
|
def test_name_in_between_wildcards(name: dns.name.Name, named_port: int) -> None:
|
||||||
@@ -172,6 +176,7 @@ def test_name_in_between_wildcards(name: dns.name.Name, named_port: int) -> None
|
|||||||
assert response_msg.answer == expected_answer, str(response_msg)
|
assert response_msg.answer == expected_answer, str(response_msg)
|
||||||
|
|
||||||
|
|
||||||
|
@settings(deadline=None)
|
||||||
@given(
|
@given(
|
||||||
name=dns_names(
|
name=dns_names(
|
||||||
suffix=isctest.name.prepend_label("*", NESTED_SUFFIX),
|
suffix=isctest.name.prepend_label("*", NESTED_SUFFIX),
|
||||||
|
Reference in New Issue
Block a user