2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Merge branch '3001-pytest-nitpicks' into 'main'

system tests stability tweaks and cleanup

Closes #3001

See merge request isc-projects/bind9!8239
This commit is contained in:
Tom Krizek
2023-08-23 12:48:58 +00:00
9 changed files with 23 additions and 8 deletions

View File

@@ -406,6 +406,7 @@ cross-version-config-tests:
"$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt
- '( ! grep -F "grep: warning:" pytest.out.txt )'
after_script:
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
- *display_pytest_failures
.system_test: &system_test_job

View File

@@ -2,7 +2,6 @@
.hypothesis
.mypy_cache
__pycache__
_last_test_run
dig.out*
rndc.out*
nsupdate.out*

View File

@@ -30,6 +30,11 @@ import dns.rdatatype
import dns.resolver
pytestmark = pytest.mark.skipif(
sys.version_info < (3, 7), reason="Python >= 3.7 required [GL #3001]"
)
def has_signed_apex_nsec(zone, response):
has_nsec = False
has_rrsig = False

View File

@@ -9,6 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
import pytest_custom_markers
# The qmin test is inherently unstable, see GL #904 for details.
@pytest_custom_markers.flaky(max_runs=3)
def test_qmin(run_tests_sh):
run_tests_sh()

View File

@@ -9,6 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
import pytest_custom_markers
# The reclimit is known to be quite unstable. GL #1587
@pytest_custom_markers.flaky(max_runs=2)
def test_reclimit(run_tests_sh):
run_tests_sh()

View File

@@ -9,6 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
import pytest_custom_markers
# The rrl is known to be quite unstable. GL #172
@pytest_custom_markers.flaky(max_runs=2)
def test_rrl(run_tests_sh):
run_tests_sh()

View File

@@ -34,10 +34,12 @@ def check_refresh(refresh, min_time, max_time):
assert refresh <= max_time
def check_loaded(loaded, expected):
def check_loaded(loaded, expected): # pylint: disable=unused-argument
# Sanity check the zone timers values
assert loaded == expected
assert loaded < now
# NOTE This check has been disabled due to GL #3983
# assert loaded == expected
# assert loaded < now
pass
def check_zone_timers(loaded, expires, refresh, loaded_exp):

View File

@@ -12,7 +12,6 @@
# information regarding copyright ownership.
from datetime import datetime
import os
import pytest
@@ -83,7 +82,6 @@ def test_zone_timers_primary_json(statsport):
)
@pytest.mark.xfail(reason="GL #3983", strict="LEGACY_TEST_RUNNER" not in os.environ)
def test_zone_timers_secondary_json(statsport):
generic.test_zone_timers_secondary(
fetch_zones_json,

View File

@@ -12,7 +12,6 @@
# information regarding copyright ownership.
from datetime import datetime
import os
import xml.etree.ElementTree as ET
import pytest
@@ -113,7 +112,6 @@ def test_zone_timers_primary_xml(statsport):
)
@pytest.mark.xfail(reason="GL #3983", strict="LEGACY_TEST_RUNNER" not in os.environ)
def test_zone_timers_secondary_xml(statsport):
generic.test_zone_timers_secondary(
fetch_zones_xml,