From: Zbigniew Jędrzejewski-Szmek Date: Sat, 2 Dec 2023 16:15:13 +0000 (+0100) Subject: TEST-26: add test for systemctl edit --stdin X-Git-Tag: v256-rc1~1566^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30302%2Fhead;p=thirdparty%2Fsystemd.git TEST-26: add test for systemctl edit --stdin --- diff --git a/test/units/testsuite-26.sh b/test/units/testsuite-26.sh index 1e11c420e1a..5aaac099f45 100755 --- a/test/units/testsuite-26.sh +++ b/test/units/testsuite-26.sh @@ -22,6 +22,8 @@ trap at_exit EXIT # Note: the service file is created under /usr on purpose to test # the 'revert' verb as well export UNIT_NAME="systemctl-test-$RANDOM.service" +export UNIT_NAME2="systemctl-test-$RANDOM.service" + cat >"/usr/lib/systemd/system/$UNIT_NAME" <<\EOF [Unit] Description=systemctl test @@ -56,6 +58,20 @@ printf '%b' '[Service]\n' 'ExecStart=\n' 'ExecStart=sleep 10d' >"+4" EDITOR='mv' script -ec 'systemctl edit "$UNIT_NAME"' /dev/null printf '%s\n' '[Service]' 'ExecStart=' 'ExecStart=sleep 10d' | cmp - "/etc/systemd/system/$UNIT_NAME.d/override.conf" +systemctl edit "$UNIT_NAME" --stdin --drop-in=override2.conf <