2 # SPDX-License-Identifier: LGPL-2.1-or-later
5 TEST_DESCRIPTION
="Tests for systemd-resolved"
7 NSPAWN_ARGUMENTS
="--private-network"
9 # shellcheck source=test/test-functions
10 .
"${TEST_BASE_DIR:?}/test-functions"
12 test_require_bin knotd
14 # We need at least Knot 3.0 which support (among others) the ds-push directive
15 if ! knotc
-c "${TEST_BASE_DIR:?}/knot-data/knot.conf" conf-check
; then
16 echo "This test requires at least Knot 3.0. skipping..."
21 local workspace
="${1:?}"
23 image_install kzonecheck keymgr kjournalprint knotc knotd
24 image_install
"${ROOTLIBDIR:?}/system/knot.service"
25 image_install
-o /lib
/tmpfiles.d
/knot.conf
26 image_install
-o /etc
/dbus-
1/system.d
/cz.nic.knotd.conf
27 image_install
-o /etc
/default
/knot
29 # Copy over our configuration
30 mkdir
-p "${workspace:?}/var/lib/knot/zones/" "${workspace:?}/etc/knot/"
31 cp -rfv "${TEST_BASE_DIR:?}"/knot-data
/zones
/* "$workspace/var/lib/knot/zones/"
32 cp -fv "${TEST_BASE_DIR:?}/knot-data/knot.conf" "$workspace/etc/knot/knot.conf"
33 chgrp
-R knot
"$workspace/etc/knot/" "$workspace/var/lib/knot/"
34 chmod -R ug
+rwX
"$workspace/var/lib/knot/"
35 chmod -R g
+r
"$workspace/etc/knot/"
37 # Install DNS-related utilities (usually found in the bind-utils package)
38 image_install delv
dig host nslookup
40 if command -v nft
>/dev
/null
; then