mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
TEST-54-CREDS: add test for ExecStartPost= (#31194)
This commit is contained in:
parent
0f781376c0
commit
54c3546188
|
@ -297,11 +297,18 @@ fi
|
|||
systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/etc/os-release' \
|
||||
-p 'ExecStartPre=true' \
|
||||
-p 'ExecStartPre=systemd-creds cat os' \
|
||||
--unit=test-54-exec-start.service \
|
||||
--unit=test-54-exec-start-pre.service \
|
||||
--wait \
|
||||
--pipe \
|
||||
true | cmp /etc/os-release
|
||||
|
||||
# https://github.com/systemd/systemd/issues/31194
|
||||
systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/etc/os-release' \
|
||||
-p 'ExecStartPost=systemd-creds cat os' \
|
||||
--unit=test-54-exec-start-post.service \
|
||||
--service-type=oneshot --wait --pipe \
|
||||
true | cmp /etc/os-release
|
||||
|
||||
if ! systemd-detect-virt -q -c ; then
|
||||
# Validate that the credential we inserted via the initrd logic arrived
|
||||
test "$(systemd-creds cat --system myinitrdcred)" = "guatemala"
|
||||
|
|
Loading…
Reference in a new issue