]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-75-RESOLVED: drop unnecessary symlink creation
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 13:16:34 +0000 (22:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 13:55:22 +0000 (22:55 +0900)
It is always done in setup().

test/units/TEST-75-RESOLVED.sh

index cf78e8b6dd74abf51b6cbe61440057c91a5388c2..3ba908981f0e666aabebce043e717a7814d55bc9 100755 (executable)
@@ -850,7 +850,6 @@ testcase_11_nft() {
         echo "[Resolve]"
         echo "StaleRetentionSec=1d"
     } >/run/systemd/resolved.conf.d/test.conf
-    ln -svf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
     systemctl reload systemd-resolved.service
 
     run dig stale1.unsigned.test -t A
@@ -1096,10 +1095,6 @@ testcase_14_refuse_record_types() {
     # shellcheck disable=SC2317
     cleanup() {
         rm -f /run/systemd/resolved.conf.d/refuserecords.conf
-        if [[ -e /etc/resolv.conf.bak ]]; then
-            rm -f /etc/resolv.conf
-            mv /etc/resolv.conf.bak /etc/resolv.conf
-        fi
         restart_resolved
     }
     trap cleanup RETURN ERR
@@ -1109,11 +1104,8 @@ testcase_14_refuse_record_types() {
         echo "[Resolve]"
         echo "RefuseRecordTypes=AAAA SRV TXT"
     } >/run/systemd/resolved.conf.d/refuserecords.conf
-    if [[ -e /etc/resolv.conf ]]; then
-        mv /etc/resolv.conf /etc/resolv.conf.bak
-    fi
-    ln -svf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
     systemctl reload systemd-resolved.service
+
     run dig localhost -t AAAA
     grep -qF "status: REFUSED" "$RUN_OUT"