mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-12 07:10:03 -04:00
Test cipher-suites after zone transfers complete
Ensure the zone transfers have completed (successfully or not) before
running the test cases, because they assume zone transfers have been
done.
(cherry picked from commit 23fb615963)
This commit is contained in:
parent
2eb5ce24fb
commit
e7a469133c
3 changed files with 29 additions and 2 deletions
|
|
@ -587,7 +587,7 @@ pylint:
|
|||
script:
|
||||
- pylint --rcfile $CI_PROJECT_DIR/.pylintrc $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|^bin/tests/system/|^contrib/)')
|
||||
# Ignore Pylint wrong-import-position error in system test to enable use of pytest.importorskip
|
||||
- pylint --rcfile $CI_PROJECT_DIR/.pylintrc --disable=wrong-import-position $(git ls-files 'bin/tests/system/*.py' | grep -vE 'ans\.py')
|
||||
- pylint --rcfile $CI_PROJECT_DIR/.pylintrc --disable=wrong-import-position $(git ls-files 'bin/tests/system/*.py' | grep -vE '(ans\.py|vulture_ignore_list\.py)')
|
||||
|
||||
reuse:
|
||||
<<: *precheck_job
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
import re
|
||||
|
||||
import pytest
|
||||
|
||||
pytest.importorskip("dns", minversion="2.5.0")
|
||||
|
|
@ -26,6 +28,17 @@ pytestmark = pytest.mark.extra_artifacts(
|
|||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def transfers_complete(servers):
|
||||
for zone in ["example", "example-aes-128", "example-aes-256", "example-chacha-20"]:
|
||||
pattern = re.compile(
|
||||
f"transfer of '{zone}/IN' from 10.53.0.1#[0-9]+: Transfer completed"
|
||||
)
|
||||
for ns in ["ns2", "ns3", "ns4", "ns5"]:
|
||||
with servers[ns].watch_log_from_start() as watcher:
|
||||
watcher.wait_for_line(pattern)
|
||||
|
||||
|
||||
@pytest.mark.requires_zones_loaded("ns1", "ns2", "ns3", "ns4", "ns5")
|
||||
@pytest.mark.parametrize(
|
||||
"qname,ns,rcode",
|
||||
|
|
@ -69,7 +82,8 @@ pytestmark = pytest.mark.extra_artifacts(
|
|||
),
|
||||
],
|
||||
)
|
||||
def test_cipher_suites_tls_xfer(qname, ns, rcode):
|
||||
# pylint: disable=redefined-outer-name,unused-argument
|
||||
def test_cipher_suites_tls_xfer(qname, ns, rcode, transfers_complete):
|
||||
msg = dns.message.make_query(qname, "AXFR")
|
||||
ans = isctest.query.tls(msg, f"10.53.0.{ns}")
|
||||
assert ans.rcode() == rcode
|
||||
|
|
|
|||
13
bin/tests/system/vulture_ignore_list.py
Normal file
13
bin/tests/system/vulture_ignore_list.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
transfers_complete # unused function (cipher-suites/tests_cipher_suites.py:31)
|
||||
transfers_complete # unused variable (cipher-suites/tests_cipher_suites.py:86)
|
||||
Loading…
Reference in a new issue