diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-16 05:03:46 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-16 05:45:08 +0200 |
commit | 9a4a8fbe48a50066c890893bc06088e975f77658 (patch) | |
tree | f56665c800b6bc712e2a52864d639890b4e4ff76 /test | |
parent | network-generator: also copy drop-ins for networkd.conf from credential (diff) | |
download | systemd-9a4a8fbe48a50066c890893bc06088e975f77658.tar.xz systemd-9a4a8fbe48a50066c890893bc06088e975f77658.zip |
test: add test case for network.conf.* credential
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-74.network-generator.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/units/testsuite-74.network-generator.sh b/test/units/testsuite-74.network-generator.sh index e7ccea1ede..5b5b0a13a3 100755 --- a/test/units/testsuite-74.network-generator.sh +++ b/test/units/testsuite-74.network-generator.sh @@ -5,13 +5,21 @@ set -eux set -o pipefail at_exit() { + rm -f /run/credstore/network.conf.50-testme rm -f /run/credstore/network.network.50-testme + rm -f /run/systemd/networkd.conf.d/50-testme.conf + rm -f /run/systemd/network/50-testme.network rm -f /run/systemd/system/systemd-network-generator.service.d/50-testme.conf } trap at_exit EXIT mkdir -p /run/credstore +cat > /run/credstore/network.conf.50-testme <<EOF +[Network] +SpeedMeter=yes +EOF + cat > /run/credstore/network.network.50-testme <<EOF [Match] Property=IDONTEXIST @@ -19,9 +27,11 @@ EOF systemctl edit systemd-network-generator.service --stdin --drop-in=50-testme.conf <<EOF [Service] +LoadCredential=network.conf.50-testme LoadCredential=network.network.50-testme EOF systemctl restart systemd-network-generator -test -f /run/systemd/network/50-testme.network +diff /run/credstore/network.conf.50-testme /run/systemd/networkd.conf.d/50-testme.conf +diff /run/credstore/network.network.50-testme /run/systemd/network/50-testme.network |