1:255.13-alt1
[systemd_ALT.git] / test / TEST-75-RESOLVED / test.sh
blob55a9f1b358f1ddf681add0355fe64b7c8d9b25a1
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -e
5 TEST_DESCRIPTION="Tests for systemd-resolved"
6 TEST_NO_QEMU=1
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..."
17 exit 0
20 test_append_files() {
21 local workspace="${1:?}"
22 # Install knot
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
41 # Install nftables
42 image_install nft
46 do_test "$@"