From e4050ff41eab89f481049a53a9c3215fcaca79a0 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 5 Sep 2022 13:54:22 +0200 Subject: [PATCH 1/2] test: mark knot.conf tmpfiles config as optional Since it got removed in the recent knot release. See: https://github.com/CZ-NIC/knot/commit/a6971a4025133a77b29f6d2b381b40dc0499730c --- test/TEST-75-RESOLVED/test.sh | 2 +- test/units/testsuite-75.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/TEST-75-RESOLVED/test.sh b/test/TEST-75-RESOLVED/test.sh index cbf35ee292..6c63db65fb 100755 --- a/test/TEST-75-RESOLVED/test.sh +++ b/test/TEST-75-RESOLVED/test.sh @@ -24,8 +24,8 @@ test_append_files() { local workspace="${1:?}" # Install knot image_install kzonecheck keymgr kjournalprint knotc knotd - image_install /lib/tmpfiles.d/knot.conf image_install "${ROOTLIBDIR:?}/system/knot.service" + image_install -o /lib/tmpfiles.d/knot.conf image_install -o /etc/dbus-1/system.d/cz.nic.knotd.conf image_install -o /etc/default/knot diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh index 08abc3f272..81a2ab37d0 100755 --- a/test/units/testsuite-75.sh +++ b/test/units/testsuite-75.sh @@ -64,6 +64,12 @@ ln -svf /etc/bind.keys /etc/bind/bind.keys # Start the services systemctl unmask systemd-networkd systemd-resolved systemctl start systemd-networkd systemd-resolved +# Create knot's runtime dir, since from certain version it's provided only by +# the package and not created by tmpfiles/systemd +if [[ ! -d /run/knot ]]; then + mkdir -p /run/knot + chown -R knot:knot /run/knot +fi systemctl start knot # Wait a bit for the keys to propagate sleep 4 From 615fc2c3ce4787a97085adbd78863835befece37 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 5 Sep 2022 17:28:04 +0200 Subject: [PATCH 2/2] test: zone-set requires TTL for the first record in the rrset I'm not sure why this worked previously. --- test/units/testsuite-75.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh index 81a2ab37d0..5158536f49 100755 --- a/test/units/testsuite-75.sh +++ b/test/units/testsuite-75.sh @@ -87,7 +87,7 @@ if knotc zone-get test. onlinesign.test. ds | grep .; then fi # Propagate the new DS records while read -ra line; do - knotc zone-set test. "${line[@]}" + knotc zone-set test. "${line[0]}" 600 "${line[@]:1}" done < <(keymgr onlinesign.test. ds) knotc zone-commit test.