From 4bc435ab103002fedc4ce79a37c6a0fdab8c14bb Mon Sep 17 00:00:00 2001 From: Colin Vidal Date: Wed, 19 Nov 2025 17:36:17 +0100 Subject: [PATCH] add checkconf test for named remote-servers Add checkconf system test to cover usage of `remote-servers` with a named server-list and a `key` and/or a `tls` option. --- .../checkconf/bad-remote-servers-key.conf | 15 +++++++++++ .../checkconf/bad-remote-servers-tls.conf | 15 +++++++++++ .../checkconf/good-remote-servers-named.conf | 27 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 bin/tests/system/checkconf/bad-remote-servers-key.conf create mode 100644 bin/tests/system/checkconf/bad-remote-servers-tls.conf create mode 100644 bin/tests/system/checkconf/good-remote-servers-named.conf diff --git a/bin/tests/system/checkconf/bad-remote-servers-key.conf b/bin/tests/system/checkconf/bad-remote-servers-key.conf new file mode 100644 index 0000000000..d4963a87f8 --- /dev/null +++ b/bin/tests/system/checkconf/bad-remote-servers-key.conf @@ -0,0 +1,15 @@ +/* + * 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. + */ + +remote-servers a { 1.2.3.4; }; +remote-servers d { a key foo; }; diff --git a/bin/tests/system/checkconf/bad-remote-servers-tls.conf b/bin/tests/system/checkconf/bad-remote-servers-tls.conf new file mode 100644 index 0000000000..461975da59 --- /dev/null +++ b/bin/tests/system/checkconf/bad-remote-servers-tls.conf @@ -0,0 +1,15 @@ +/* + * 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. + */ + +remote-servers a { 1.2.3.4; }; +remote-servers d { a tls foo; }; diff --git a/bin/tests/system/checkconf/good-remote-servers-named.conf b/bin/tests/system/checkconf/good-remote-servers-named.conf new file mode 100644 index 0000000000..f7eadc587f --- /dev/null +++ b/bin/tests/system/checkconf/good-remote-servers-named.conf @@ -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. + */ + +key foo { + algorithm hmac-sha256; + secret "9999abcd8765"; +}; + +tls bar { +}; + +remote-servers a { 1.2.3.4; }; +remote-servers b { 1.2.3.4; }; +remote-servers c { 1.2.3.4; 5.6.7.8; ::1; }; +remote-servers d { a key foo; b tls bar; c key foo tls bar; }; +remote-servers e { a key foo.; }; +remote-servers f { b tls bar; };