System tests: quadlet: fix race in %T test

Use "--wait" flag in "systemd start" for a one-shot container.
Should fix a CI failure I've been seeing sporadically, in which
the --==VALUE==-- string is not seen in journal.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2023-07-26 15:28:09 -06:00
parent b2a857a023
commit e335a66a9d
1 changed files with 2 additions and 1 deletions

View File

@ -768,10 +768,11 @@ Description=Get the value of percent T
ExecStart=/bin/bash -c "echo --==%T==--"
EOF
systemctl daemon-reload
systemctl start $service
systemctl --wait start $service
echo "$_LOG_PROMPT journalctl -u $service"
run journalctl -u $service
echo "$output"
assert "$output" =~ " --==.*==--" "get-percent-T unit ran to completion"
percent_t=$(expr "$output" : ".* --==\(.*\)==--")
# Clean up. Don't bother to systemctl-reload, service_setup does that below.
rm -f $unitfile