Add a system test that ensures root zone mirroring works out of the box

This is a test for #5380.

(cherry picked from commit a69efc678c)
This commit is contained in:
Štěpán Balážik 2025-06-18 21:06:19 +02:00
parent e2a91c06c8
commit 97caa0addc
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/*
* 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.
*/
key rndc_key {
secret "1234abcd8765";
algorithm @DEFAULT_HMAC@;
};
controls {
inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options {
pid-file "named.pid";
listen-on port @PORT@ {10.53.0.4;};
};
zone "." { type mirror; };

View file

@ -0,0 +1,27 @@
# 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.
from typing import Dict
from isctest.instance import NamedInstance
from isctest.mark import live_internet_test
@live_internet_test
def test_mirror_root_zone(servers: Dict[str, NamedInstance]):
"""
This test pulls the root zone from the Internet, so let's only run
it when CI_ENABLE_LIVE_INTERNET_TESTS is set.
"""
ns4 = servers["ns4"]
with ns4.watch_log_from_start() as watch_log:
# TimeoutError is raised if the line is not found and the test will fail.
watch_log.wait_for_line("Transfer status: success")