]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add test case for 'networkctl cat' without arguments 32297/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Apr 2024 04:30:19 +0000 (13:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Apr 2024 04:31:14 +0000 (13:31 +0900)
test/units/testsuite-74.networkctl.sh

index 6cd5267b721abe94da7d78d1c12573aa83a15a71..d05de17bde059916e242e2514529a12e74d01773 100755 (executable)
@@ -15,6 +15,8 @@ at_exit() {
             {/usr/lib,/etc}/systemd/network/"$LINK_NAME" "/etc/systemd/network/${NETWORK_NAME}.d" \
             "new" "+4"
     fi
+
+    rm -f /run/systemd/networkd.conf.d/10-hoge.conf
 }
 
 trap at_exit EXIT
@@ -110,3 +112,12 @@ ip_link="$(ip link show test2)"
 if systemctl --quiet is-active systemd-udevd; then
     assert_in 'alias test_alias' "$ip_link"
 fi
+
+mkdir -p /run/systemd/networkd.conf.d
+cat >/run/systemd/networkd.conf.d/10-hoge.conf <<EOF
+# TEST DROP-IN FILE
+[Network]
+SpeedMeter=yes
+EOF
+
+assert_in '# TEST DROP-IN FILE' "$(networkctl cat)"