summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-74.networkctl.sh
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-04-16 06:30:19 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-04-16 06:31:14 +0200
commit9c202ba2e22f618309c3462ed53a188c0c12d6e6 (patch)
treeb63c54ad52f1b3670e1d19aad1482ac2cc042641 /test/units/testsuite-74.networkctl.sh
parentnetworkctl: allow to call 'networkctl cat' without arguments (diff)
downloadsystemd-9c202ba2e22f618309c3462ed53a188c0c12d6e6.tar.xz
systemd-9c202ba2e22f618309c3462ed53a188c0c12d6e6.zip
test: add test case for 'networkctl cat' without arguments
Diffstat (limited to '')
-rwxr-xr-xtest/units/testsuite-74.networkctl.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/units/testsuite-74.networkctl.sh b/test/units/testsuite-74.networkctl.sh
index 6cd5267b72..d05de17bde 100755
--- a/test/units/testsuite-74.networkctl.sh
+++ b/test/units/testsuite-74.networkctl.sh
@@ -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)"